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

Dumitru Ceara noreply at github.com
Fri Sep 4 13:51:12 UTC 2020


  Branch: refs/heads/master
  Home:   https://github.com/ovn-org/ovn
  Commit: 94a32fca2d2b825fece0ef5b1873459bd9857dd3
      https://github.com/ovn-org/ovn/commit/94a32fca2d2b825fece0ef5b1873459bd9857dd3
  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>


  Commit: dce1af31b550a9fb57b01cbe0b4139b6768f2521
      https://github.com/ovn-org/ovn/commit/dce1af31b550a9fb57b01cbe0b4139b6768f2521
  Author: Dumitru Ceara <dceara at redhat.com>
  Date:   2020-09-04 (Fri, 04 Sep 2020)

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

  Log Message:
  -----------
  chassis: Fix chassis_private record updates when the system-id changes.

Also:
- Change conditional monitoring for Chassis_Private to use the chassis uuid
  instead of chassis name. Using the chassis->name field does not work
  because this is the old value of the field and would cause ovsdb-server
  to inform ovn-controller that the updated Chassis_Private record was
  "deleted" because it doesn't match the monitor condition anymore.
- Allow ovn-sbctl to access Chassis_Private records by name.

Reported-at: https://bugzilla.redhat.com/1873032
Reported-by: Ying Xu <yinxu at redhat.com>
CC: Han Zhou <hzhou at ovn.org>
Fixes: 4adc10f58127 ("Avoid nb_cfg update notification flooding")
Signed-off-by: Dumitru Ceara <dceara at redhat.com>
Signed-off-by: Numan Siddique <numans at ovn.org>


Compare: https://github.com/ovn-org/ovn/compare/d6d59911412e...dce1af31b550


More information about the git mailing list