Hi,

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'.

Expected:
---------
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:
-------------------
["db:Hardware_vtep"---OVSDB-SERVER(Active)-(ptcp:3.1.1.2:7000
)-]------------------[-OVSDB-SERVER(Backup)---"db:Hardware_vtep"]

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
--unixctl=/opt/ovsdb/ovsdb-server.ctl

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

    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
    ------------------------------------
-------------------------------------- ------------ --------
    4121ba6c-a729-45b1-8f69-806b32584d04
[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:10.133.130.126:6640"


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

    3.2 At instance-2:
    ovs-appctl -t /opt/ovsdb/ovsdb-server.ctl
ovsdb-server/set-active-ovsdb-server tcp:3.1.1.2:7000
    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
ovsdb-server/connect-active-ovsdb-server

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

Thanks,
Arun.
_______________________________________________
discuss mailing list
disc...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-discuss

Reply via email to