[ovs-git] [ovn-org/ovn] 0716c4: chassis: Fix the way encaps are updated for a chas...

Dumitru Ceara noreply at github.com
Fri Sep 4 14:33:37 UTC 2020


  Branch: refs/heads/branch-20.06
  Home:   https://github.com/ovn-org/ovn
  Commit: 0716c4f4cf2d97f03c1f2e5099fece92f3183d43
      https://github.com/ovn-org/ovn/commit/0716c4f4cf2d97f03c1f2e5099fece92f3183d43
  Author: Dumitru Ceara <dceara at redhat.com>
  Date:   2020-09-04 (Fri, 04 Sep 2020)

  Changed paths:
    M controller/chassis.c
    M tests/ovn-controller.at

  Log Message:
  -----------
  chassis: Fix the way encaps are updated for a chassis record.

ovn-controller always stores the last configured system-id/chassis-id in
memory regardless if the connection to the SB is up or down. This is OK
as long as the change can be committed successfully when the SB DB
connection comes back up.

Without this change, if the chassis-id changes while the SB connection is
down, ovn-controller will fail to create the new record but nevertheless
update its in-memory chassis-id. When the SB connection is restored
ovn-controller tries to find the record corresponding to the chassis-id
it stored in memory. This fails causing ovn-controller to try to insert
a new record. But at this point a constraint violation is hit in the SB
because the Encap records of the "stale" chassis still exist in the DB,
along with the old chassis record.

This commit changes the way we search for a "stale" chassis record in the
SB to cover the above mentioned case. Also, in such cases there's no need
to recreate the Encaps, it's sufficient to update the chassis_name field.

Fixes: 5344f24ecb1a ("ovn-controller: Refactor chassis.c to abstract the string parsing")
Signed-off-by: Dumitru Ceara <dceara at redhat.com>
Signed-off-by: Numan Siddique <numans at ovn.org>

(cherry-picked from master commit 94a32fca2d2b825fece0ef5b1873459bd9857dd3)




More information about the git mailing list