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)

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 },


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.





From: aginwala <[email protected]>
Date: Friday, August 23, 2019 at 11:15 AM
To: Ben Pfaff <[email protected]>
Cc: aginwala <[email protected]>, ovs dev <[email protected]>, "Ginwala, 
Aliasgar" <[email protected]>
Subject: Re: [ovs-dev] [PATCH v2] ovsdb-tool: Convert clustered db to 
standalone db.

Thanks Ben for review!

On Fri, Aug 23, 2019 at 10:42 AM Ben Pfaff <[email protected]<mailto:[email protected]>> 
wrote:
On Thu, Aug 22, 2019 at 05:53:10PM -0700, 
[email protected]<mailto:[email protected]> wrote:
> From: Aliasgar Ginwala <[email protected]<mailto:[email protected]>>
>
> Add support in ovsdb-tool for migrating clustered dbs to standalone dbs.
> E.g. usage to migrate nb/sb db to standalone db from raft:
> ovsdb-tool migrate-cluster-db ovnnb_db.db ovnnb_db_cluster.db
>
> Signed-off-by: Aliasgar Ginwala <[email protected]<mailto:[email protected]>>

In addition to Han's comments, I suggest updating the documentation,
both for ovsdb-tool itself and Documentation/ref/ovsdb.7.rst.  This kind
of tool can't be sure to get an up-to-date snapshot of the database,
since it only looks at one member of the raft cluster and therefore
can't be sure about the current consensus, so it's more risky to use it
than an online operation like "ovsdb-client backup".  That's probably OK
in some circumstances (notably, if the cluster is already down and can't
be easily revived), but I think that the documentation should be clear
that there is a trade-off.
Yup sure. Actually, for testing I use leader's db to avoid major drift. But 
overall agree as its little risky but can help in
 in crisis like situation if  cluster is down and we want to revert to 
standalone mode. Will update document likewise
as per your suggestion,
_______________________________________________
dev mailing list
[email protected]<mailto:[email protected]>
https://mail.openvswitch.org/mailman/listinfo/ovs-dev<https://nam01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fmail.openvswitch.org%2Fmailman%2Flistinfo%2Fovs-dev&data=02%7C01%7Caginwala%40ebay.com%7Cfc65ce4035c74935002a08d727f5e2d2%7C46326bff992841a0baca17c16c94ea99%7C0%7C0%7C637021809344246964&sdata=jAAphoHQGCGKJC%2FesjckfG3unkAxBCmOzKHNiZ5HT%2B8%3D&reserved=0>
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to