[ovs-dev] [PATCH v2]: ovsdb: add capability to dump table content in ovsdb-client

Russell Bryant rbryant at redhat.com
Thu Jul 2 13:50:54 UTC 2015


On 06/30/2015 11:17 PM, Andy Zhou wrote:
> On Tue, Jun 30, 2015 at 7:47 PM, Sabyasachi Sengupta
> <Sabyasachi.Sengupta at alcatel-lucent.com> wrote:
>>
>>> It seems we just need to extract the text between the table name and the
>>> first
>>> blank line below it. this should pretty easy with either awk or sed.
>>>
>>> As for efficiency, the db files I have access to are sufficiently
>>> small that the script should work in practise,
>>> especially used only for debugging.  Do you have a very large DB file
>>> or a different use case?
>>
>>
>> Our deployments typically have large amount of data in tables in ovsdb and
>> finding out content of one table has been hard out of such large outputs,
>> especially from usability perspective. One can always go to awk/sed, but for
>> convenience traditional unix/linux systems often provides different options
>> of standard commands that helps narrow down output and present it to users
>> in a more presentable manner. I suppose I don't need to mention about
>> usefulness of '-d' option of ls, or '-type' of find here. Although it is
>> possible to write wrappers over 'find' that does the job of '-type dir', but
>> having it as part of 'find' helps in standardizing output and allows users
>> to do 'other' stuff rather than each program or individual user do this
>> separately..
> O.K. I am sold on the table option.
>>
>> While one can write their own scriptlets, the other important question is
>> how one would distribute this script to deployable systems. One easier
>> approach if there is something available as part of ovs package itself.
>>
> OVS currently do not carry many helper scripts. A few of them
> currently living in utilities.
> 
>> The motivation of contributing this actually came from your existing
>> DATABASE option that appears to eliminate the need to have similar scripts,
>> but extend it with a new convenience TABLE option.
> 
> Make sense. Thanks for working on it.

Random feature idea on top of this ... it would be handy to be able to
specify how the output gets sorted, too.

For example, in OVN, the OVN_Southbound database has a table that
defines logical flows (sort of similar to OpenFlow but for logical
networks).  I look at the contents of this table a lot.  It would be
nice to be able to tell it to sort by table_id, and even a secondary
sort on priority.

This may be overkill for ovsdb-client and we should just have an OVN
specific utility for what I want, but I figured I'd share the idea out
loud at least.  :-)

-- 
Russell Bryant



More information about the dev mailing list