-
Notifications
You must be signed in to change notification settings - Fork 254
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tests: Wait for controller exit before restart.
In some rare cases, and despite "recent" changes to wait for cleanup before replying to exit, ovn-controller was still running when trying to restart it. Signed-off-by: Xavier Simonart <[email protected]> Signed-off-by: Dumitru Ceara <[email protected]> (cherry picked from commit ca52a80)
- Loading branch information
1 parent
c5d851b
commit 570b968
Showing
2 changed files
with
15 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20642,7 +20642,7 @@ echo $expected | ovstest test-ovn expr-to-packets > expected | |
OVN_CHECK_PACKETS([hv2/vif1-tx.pcap], [expected]) | ||
|
||
# Stop ovn-controller on hv2 with --restart flag | ||
as hv2 ovs-appctl -t ovn-controller exit --restart | ||
OVN_CONTROLLER_EXIT([hv2]) | ||
|
||
# Now send the packet again. This time, it should still arrive | ||
OVS_WAIT_UNTIL([as hv1 ovs-appctl -t ovn-controller inject-pkt "$packet"]) | ||
|
@@ -29329,7 +29329,7 @@ check test "$hvt2" -gt 0 | |
# Kill ovn-controller on chassis hv3, so that it won't update nb_cfg. | ||
# Then wait for 9 out of 10 | ||
sleep 1 | ||
check as hv3 ovn-appctl -t ovn-controller exit --restart | ||
OVN_CONTROLLER_EXIT([hv3]) | ||
wait_for_ports_up | ||
ovn-nbctl --wait=sb sync | ||
wait_row_count Chassis_Private 9 name!=hv3 nb_cfg=2 | ||
|
@@ -36347,7 +36347,7 @@ check_tunnel_port hv1 br-int [email protected]%192.168.0.1 | |
check_tunnel_port hv2 br-int [email protected]%192.168.0.2 | ||
|
||
# Stop ovn-controller on hv1 | ||
check as hv1 ovn-appctl -t ovn-controller exit --restart | ||
OVN_CONTROLLER_EXIT([hv1]) | ||
|
||
# The tunnel should remain intact | ||
check_tunnel_port hv1 br-int [email protected]%192.168.0.1 | ||
|
@@ -36376,7 +36376,7 @@ check_tunnel_port hv2 br-int1 [email protected]%192.168.0.2 | |
check grep -q "Clearing old tunnel port \"ovn-hv1-0\" ([email protected]%192.168.0.2) from bridge \"br-int\"" hv2/ovn-controller.log | ||
|
||
# Stop ovn-controller on hv1 | ||
check as hv1 ovn-appctl -t ovn-controller exit --restart | ||
OVN_CONTROLLER_EXIT([hv1]) | ||
|
||
# The tunnel should remain intact | ||
check_tunnel_port hv1 br-int1 [email protected]%192.168.0.1 | ||
|
@@ -36466,10 +36466,7 @@ prev_id2=$(ovs-vsctl --bare --columns _uuid find port external_ids:ovn-chassis-i | |
# The hv2 is running we can remove the override file | ||
rm -f ${OVN_SYSCONFDIR}/system-id-override | ||
|
||
check ovn-appctl -t ovn-controller exit --restart | ||
|
||
# Make sure ovn-controller stopped before restarting it | ||
OVS_WAIT_UNTIL([test x$(ovn-appctl -t ovn-controller debug/status) != "xrunning"]) | ||
OVN_CONTROLLER_EXIT([hv1]) | ||
|
||
# for some reason SSL ovsdb configuration overrides CLI, so | ||
# delete ssl config from ovsdb to give CLI arguments priority | ||
|
@@ -37181,9 +37178,7 @@ AT_CHECK([grep -c "NXT_CT_FLUSH_ZONE" hv1/ovs-vswitchd.log], [0], [dnl | |
]) | ||
|
||
AS_BOX([Check conversion from UUID - restart]) | ||
ovn-appctl -t ovn-controller exit --restart | ||
# Make sure ovn-controller stopped before restarting it | ||
OVS_WAIT_UNTIL([test "$(ovn-appctl -t ovn-controller debug/status)" != "running"]) | ||
OVN_CONTROLLER_EXIT([hv1]) | ||
|
||
replace_with_uuid lr0 | ||
replace_with_uuid sw0 | ||
|