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

Dumitru Ceara dceara at redhat.com
Mon Jul 8 10:06:45 UTC 2019

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

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        |  676 +++++++++++++++++++++++++++------------
 ovn/controller/chassis.h        |    2 
 ovn/controller/ovn-controller.c |   26 +-
 tests/ovn-controller.at         |    9 +
 4 files changed, 501 insertions(+), 212 deletions(-)

v2: rebase

More information about the dev mailing list