OK.

I see what you're talking about.  It's not a bug, then.  OVSDB is just
doing its job ensuring referential integrity.

Please feel free to submit a patch to implement the feature that you
want.

On Thu, Aug 10, 2017 at 06:07:09AM +0530, Arunkumar Rg wrote:
> Hi Ben,
> 
> Thanks for your response!
> 
> I have reported this to b...@openvswitch.org.
> 
> Below is what I have shared to b...@openvswitch.org.
> 
> 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.
> 
> 
> On Wed, Aug 9, 2017 at 9:27 PM, Ben Pfaff <b...@ovn.org> wrote:
> 
> > On Wed, Aug 09, 2017 at 05:34:16PM +0530, Arunkumar Rg wrote:
> > > Hi All,
> > >
> > > I need a clarification on ovsdb-server replication's
> > > set-sync-exclude-tables.
> > >
> > > *Is there a way, by which we can say exclude syncing specific column of a
> > > table??*
> > >
> > > The use case I'm looking at is:
> > >
> > >    1. The replication is configured for DB "hardware_vtep".
> > >    2. I'm trying to use the "ovsdb-server/set-sync-exclude-tables"
> > unixctl
> > >    command for table "hardware_vtep:Manager" on the backup ovsdb-server.
> > >    3. After this the backup ovsdb-server gets replica(notification) from
> > >    the active's db except for 'Manager' table.
> > >    4. At this poiint, while processing the notification for 'Global'
> > table,
> > >    I see the below error:
> > >    5. "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""
> > >    6. I think this error could be avoided if we can say exclude syncing
> > >    'Manager' column in 'Global' table also.
> >
> > It sounds like a bug.  Probably, you should report the bug and get it
> > fixed, instead of trying to work around it.
> >
> > How can we reproduce the bug?
> >
_______________________________________________
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to