mbox series

[ovs-dev,0/3] ovn-controller: Fix and refactor chassis ovn-sbdb record init

Message ID 20190612103757.18479.70964.stgit@dceara.remote.csb
Headers show
Series ovn-controller: Fix and refactor chassis ovn-sbdb record init | expand

Message

Dumitru Ceara June 12, 2019, 10:37 a.m. UTC
The chassis_run code didn't take into account the scenario when the
system-id was changed in the Open_vSwitch table. Due to this the code
was trying to insert a new Chassis record in the OVN_Southbound DB with
the same Encaps as the previous Chassis record. The transaction used
to insert the new records was aborting due to the ["type", "ip"]
index constraint violation as we were creating new Encap entries with
the same "type" and "ip" as the old ones.

This series:
1. introduces a (partial) fix for the reported issue by storing in
ovn-controller memory the last successfully configured chassis-id.
2. refactors the code in chassis.c to abstract out the string
processing and make available the ovs configuration to the code.
that looks up stale chassis entries in the OVN_Southbound DB
3. completes the fix at point 1 above by taking care of the
scenario when ovn-controller restarts after stopping forcefully
(e.g., due to a crash) and the OVS system-id has changed in the
meantime.

Dumitru Ceara (3):
      ovn-controller: Fix chassis ovn-sbdb record init
      ovn-controller: Refactor chassis.c to abstract the string parsing
      ovn-controller: Update stale chassis entry at init


 ovn/controller/chassis.c        |  659 +++++++++++++++++++++++++++------------
 ovn/controller/chassis.h        |    2 
 ovn/controller/ovn-controller.c |   26 +-
 tests/ovn-controller.at         |    9 +
 4 files changed, 489 insertions(+), 207 deletions(-)

Comments

Ben Pfaff July 5, 2019, 9:46 p.m. UTC | #1
On Wed, Jun 12, 2019 at 12:37:57PM +0200, Dumitru Ceara wrote:
> The chassis_run code didn't take into account the scenario when the
> system-id was changed in the Open_vSwitch table. Due to this the code
> was trying to insert a new Chassis record in the OVN_Southbound DB with
> the same Encaps as the previous Chassis record. The transaction used
> to insert the new records was aborting due to the ["type", "ip"]
> index constraint violation as we were creating new Encap entries with
> the same "type" and "ip" as the old ones.

It looks like this series is still needed but that it no longer
applies.  I am sorry about that.  Would please rebase it?
Dumitru Ceara July 8, 2019, 10:18 a.m. UTC | #2
On Fri, Jul 5, 2019 at 11:46 PM Ben Pfaff <blp@ovn.org> wrote:
>
> On Wed, Jun 12, 2019 at 12:37:57PM +0200, Dumitru Ceara wrote:
> > The chassis_run code didn't take into account the scenario when the
> > system-id was changed in the Open_vSwitch table. Due to this the code
> > was trying to insert a new Chassis record in the OVN_Southbound DB with
> > the same Encaps as the previous Chassis record. The transaction used
> > to insert the new records was aborting due to the ["type", "ip"]
> > index constraint violation as we were creating new Encap entries with
> > the same "type" and "ip" as the old ones.
>
> It looks like this series is still needed but that it no longer
> applies.  I am sorry about that.  Would please rebase it?

Hi Ben,

I sent a rebased v2:
https://patchwork.ozlabs.org/project/openvswitch/list/?series=118303

Thanks,
Dumitru