[ovs-discuss] ovsdb-server replication: Does not work when set-sync-exclude-tables option is used

Arunkumar Rg arunkumar.rg at gmail.com
Thu Aug 10 00:34:58 UTC 2017


Issue summary:
On setting, "ovsdb-server/set-sync-exclude-tables" for certain tables,
ovsdb-server replication does not work.
i.e the ovsdb-server which connects to the active ovsdb-server doesn't
become 'backup'.

ovsdb-server which connects to active ovsdb-server should become 'backup'
and recieve sync for all the tables except for the tables specified in the
ctl command "ovsdb-server/set-sync-exclude-tables".

Reproduction steps:

1. Start two ovsdb-server instances with db schema as "Hardware_vtep". Lets
call them instance-1 and instance-2.

ps -ef | grep ovsdb-server
root      2704  2093  0 19:56 ?        00:00:03 ovsdb-server
/opt/ovsdb/db/vtep.db --remote=punix:/opt/ovsdb/db/db.sock

2. At instance-1: Add an entry in 'Manager' table.
    vtep-ctl --db=unix:/opt/ovsdb/db/db.sock set-manager ssl:

    ovsdb-client dump unix:/opt/ovsdb/db/db.sock    <<---showing only the
tables which is relevant to this issue.
    Global table
    _uuid                                managers
    other_config switches
-------------------------------------- ------------ --------
[73affd9e-07f0-422f-a394-47ae2a1ab499] {}

    Manager table
    _uuid                                inactivity_probe is_connected
max_backoff other_config status  target
    ------------------------------------ ---------------- ------------
----------- ------------ ------- -------------------------
    73affd9e-07f0-422f-a394-47ae2a1ab499 []               false         []
         {}                  "ssl:"

3. Now do ovsdb replication related configs:
    3.1. At instance-1:
        ovs-appctl -t /opt/ovsdb/ovsdb-server.ctl ovsdb-server/add-remote

    3.2 At instance-2:
    ovs-appctl -t /opt/ovsdb/ovsdb-server.ctl
ovsdb-server/set-active-ovsdb-server tcp:
    ovs-appctl -t /opt/ovsdb/ovsdb-server.ctl
ovsdb-server/set-sync-exclude-tables hardware_vtep:Manager
    ovs-appctl -t /opt/ovsdb/ovsdb-server.ctl

4. Issue reproduced now!!
    Instance-2 will not become 'Backup' and it'll remain in 'Active' state.

    This seem to be due to the following error, while processing the
notification for 'Global' table:

"Aug  9 12:26:38 Pollux daemon.err ovsdb-server:
ovs|00070|ovsdb_error|ERR|unexpected ovsdb error: referential integrity
violation: Table Global column managers row
4121ba6c-a729-45b1-8f69-806b32584d04 references nonexistent row
5dbedec1-8221-435f-89b3-503867d0e987 in t"

    Note: In the hardware_vtep schema, 'Global' table has a reference to
'Manager' table.

Additional inputs:
bash-3.2# ovsdb-server --version
ovsdb-server (Open vSwitch) 2.7.0

Linux version 4.1.14

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openvswitch.org/pipermail/ovs-discuss/attachments/20170810/52dd1905/attachment.html>

More information about the discuss mailing list