Skip to content

Commit 79350ef

Browse files
putnopvutalmusil
authored andcommitted
ovn-controller: Clear flow-restore-wait.
In commit 621f85e ("controller: Fix bfd up too early after unexpected reboot."), OVN would manipulate the flow-restore-wait flag in order to attempt to synchronize with OVS. The previous commit reverted this change due to a potential deadlock between OVS and OVN. If users were using a version of OVN that had commit 621f85e, then the revert will help to ensure that OVS and OVN won't deadlock any longer. However, the revert on its own does not resolve the deadlock if the previously running version of ovn-controller set flow-restore-wait to true. It requires manual intervention to get flow-restore-wait set to false or deleted from the Open_vSwitch table. This commit seeks to assist by clearing the flow-restore-wait key in the Open_vSwitch table. This way, on upgrade, the deadlock is resolved without manually setting any OVS database values. Reported-at: https://redhat.atlassian.net/browse/FDP-3862 Fixes: 621f85e ("controller: Fix bfd up too early after unexpected reboot.") Signed-off-by: Mark Michelson <mmichels@redhat.com> Acked-by: Dumitru Ceara <dceara@redhat.com> Signed-off-by: Ales Musil <amusil@redhat.com> (cherry picked from commit 89dbc40)
1 parent afb4d33 commit 79350ef

1 file changed

Lines changed: 18 additions & 0 deletions

File tree

controller/ovn-controller.c

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7554,6 +7554,24 @@ main(int argc, char *argv[])
75547554
ovsrec_open_vswitch_update_other_config_setkey(
75557555
cfg, "vlan-limit", "0");
75567556
}
7557+
/* Clear flow-restore-wait. OVN at one point would set
7558+
* flow-restore-wait in order to try to synchronize with
7559+
* OVS. However, that resulted in a bug, so that behavior
7560+
* was reverted. If upgrading from a version where OVN
7561+
* manipulted flow-restore-wait, then flow-restore-wait
7562+
* needs to be cleared in order for OVS to function
7563+
* properly. This is (hopefully) a temporary measure until
7564+
* a more reliable method of synchronizing with OVS is
7565+
* devised.
7566+
*/
7567+
if (smap_get_bool(&cfg->external_ids,
7568+
"ovn-managed-flow-restore-wait", false) &&
7569+
smap_get(&cfg->other_config, "flow-restore-wait")) {
7570+
ovsrec_open_vswitch_update_other_config_delkey(
7571+
cfg, "flow-restore-wait");
7572+
ovsrec_open_vswitch_update_external_ids_delkey(
7573+
cfg, "ovn-managed-flow-restore-wait");
7574+
}
75577575
}
75587576

75597577
static bool chassis_idx_stored = false;

0 commit comments

Comments
 (0)