[ovs-discuss] [OVN] ovsdb replication of cluster mode DB

Yun Zhou yunz at nvidia.com
Wed Jun 10 19:50:10 UTC 2020


Hi,

In ovsdb.7, it says " OVSDB can layer replication on top of any of its service models". I am trying to figure out how to setup the ovsdb replication for a raft OVSDB cluster.

My initial thought is that --sync-from would take the 3 endpoints (for a 3 node cluster) and ovsdb-server directly syncs from the leader of the cluster, but it seems that it is not what I expected:

1. --sync-from does not take more than one endpoint, if I specify "--sync_from=tcp:<ip1>:6641,tcp:<ip2>:6641,tcp:<ip3>:6641" when running the ovsdb-server, it just prompts the error message:

            "connection attempt failed (Address family not supported by protocol)". 

    Looking at the code, ovsdb_replication_init()->replication_init()->jsonrpc_session_open(sync_from, true), which does assume that sync_from() only takes one end point.

2. I then continued my test to sync-from one node from the cluster. I started by running "ovsdb-tool create /var/lib/openvswitch/ovnnb_db_repl.db /usr/share/ovn/ovn-nb.ovsschema", then ran ovsdb-server --sync-from to point to one of the cluster node only, but it prompts another error messages:

           "2020-06-10T15:54:06Z|00022|replication|INFO|Schema version mismatch, checking if OVN_Northbound can still be replicated or not.
            2020-06-10T15:54:06Z|00023|replication|INFO|Column is_connected mismatch in local db schema table Connection.
            2020-06-10T15:54:06Z|00024|replication|INFO|OVN_Northbound cannot be replicated.
            2020-06-10T15:54:06Z|00025|replication|WARN|Nothing to replicate. "

     I believe the DB_schema is the right version. It seems it is complaining the _Server schema difference between the cluster DB (it syncs from) and its own standalone DB. So do we suppose to create a one-node cluster DB to replicate the clustered DB?

Please suggest what is the best practice to setup the ovsdb replication for clustered mode OVSDB.

Thanks
- Yun


More information about the discuss mailing list