[ovs-dev] [PATCH v2] ovsdb-tool: Convert clustered db to standalone db.

Ginwala, Aliasgar aginwala at ebay.com
Fri Aug 23 22:37:15 UTC 2019


Thanks Ben:

On 8/23/19, 2:50 PM, "Ben Pfaff" <blp at ovn.org> wrote:

    On Fri, Aug 23, 2019 at 09:29:00PM +0000, Ginwala, Aliasgar wrote:
    > Hi Ben:
    > 
    > It seems ovsdb-client backup does conversion for openvswitch databases and not OVN dbs:
    > $ovsdb-client backup > standalone_db.db
    > 
    > When trying for ovnnb dbs, it keeps complaining about syntax error. May be I miss something
    > ovsdb-client backup  /var/run/openvswitch/ovnnb_db.sock /etc/openvswitch/ovnnb_db.db > test1.db
    > ovsdb-client: invalid syntax for 'backup' (use --help for help)
    
    ovsdb-client is definitely biased in favor of the Open_vSwitch database.
    It recognizes server names based on the syntax for connections, which
    always includes ":", so you would need to say
    "unix:/var/run/openvswitch/ovnnb_db.sock" as the server name.
Ah! Sure. Thanks for the pointer. Description had detail default db.sock with unix as prefix. Should have read that. 
    
    > However, I checked code and it doesn’t accept args as per code below in ovsdb_client_command
    > { "backup",             NEED_DATABASE, 0, 0,       do_backup },
    
    It doesn't accept args beyond an optional server name and database name,
    which NEED_DATABASE indicates.
    
    > Also, for ovn control plane nodes, we don’t have/need to run ovs on the control plane nodes.
    > As I didn’t have ovs running on my control plane nodes, it complained about the same.
    > ovsdb-client: failed to connect to "unix:/var/run/openvswitch/db.sock" (No such file or directory)
    > Only works if I start ovs and then run the command.
    > 
    > So I think current doc itself needs update if I hope I didn’t miss anything trivial.
    > Let me know and I can send formal patch to correct existing doc.
    
    If the documentation isn't clear, let's improve it.
Cool. That makes sense. And yes since we can pass ovn db socket, we don’t really need to have ovsdb running since ovsdb-client utility connects directly to db . So clear now.
Just sent the patch https://patchwork.ozlabs.org/patch/1152462/ to correct the usage details and correction in typo in existing doc. 
    



More information about the dev mailing list