Message ID | 20240404064739.34134-1-hzhou@ovn.org |
---|---|
State | Accepted |
Headers | show |
Series | [ovs-dev] ovn-controller.at: Fix flaky test "ofctrl wait before clearing flows". | expand |
Context | Check | Description |
---|---|---|
ovsrobot/apply-robot | success | apply and check: success |
ovsrobot/github-robot-_Build_and_Test | success | github build: passed |
ovsrobot/github-robot-_ovn-kubernetes | success | github build: passed |
Thanks for the fix, Han. Acked-by: Mark Michelson <mmichels@redhat.com> On 4/4/24 02:47, Han Zhou wrote: > Fixes: bbf2f941965a ("ofctrl: Wait at S_WAIT_BEFORE_CLEAR only once.") > Signed-off-by: Han Zhou <hzhou@ovn.org> > --- > tests/ovn-controller.at | 11 ++++++----- > 1 file changed, 6 insertions(+), 5 deletions(-) > > diff --git a/tests/ovn-controller.at b/tests/ovn-controller.at > index 3202f0beff46..f2c792c9cdf6 100644 > --- a/tests/ovn-controller.at > +++ b/tests/ovn-controller.at > @@ -2325,14 +2325,15 @@ AT_CHECK_UNQUOTED([echo $lflow_run_1], [0], [$lflow_run_2 > ]) > > # Restart OVS this time. Flows should be reinstalled without waiting. > +# Set the wait-before-clear to a large value (60s) to make the test more reliable. > +check ovs-vsctl set open . external_ids:ovn-ofctrl-wait-before-clear=60000 > +check ovn-nbctl --wait=hv sync > + > OVS_APP_EXIT_AND_WAIT([ovs-vswitchd]) > start_daemon ovs-vswitchd --enable-dummy=system -vvconn -vofproto_dpif -vunixctl > > -# Sync to make sure ovn-controller is given enough time to install the flows. > -check ovn-nbctl --wait=hv sync > - > -# Flow should be installed without any extra waiting. > -AT_CHECK([ovs-ofctl dump-flows br-int | grep -F 10.1.2.4 | grep -vF 2.2.2.2], [0], [ignore]) > +# Flow should be installed without waiting for another 60s. > +OVS_WAIT_UNTIL([ovs-ofctl dump-flows br-int | grep -F 10.1.2.4 | grep -vF 2.2.2.2]) > > check ovn-nbctl --wait=hv lb-add lb3 3.3.3.3 10.1.2.5 \ > -- ls-lb-add ls1 lb3
On Thu, Apr 4, 2024 at 10:03 AM Mark Michelson <mmichels@redhat.com> wrote: > > Thanks for the fix, Han. > > Acked-by: Mark Michelson <mmichels@redhat.com> Thanks Mark. Applied to main and backported. Han > > On 4/4/24 02:47, Han Zhou wrote: > > Fixes: bbf2f941965a ("ofctrl: Wait at S_WAIT_BEFORE_CLEAR only once.") > > Signed-off-by: Han Zhou <hzhou@ovn.org> > > --- > > tests/ovn-controller.at | 11 ++++++----- > > 1 file changed, 6 insertions(+), 5 deletions(-) > > > > diff --git a/tests/ovn-controller.at b/tests/ovn-controller.at > > index 3202f0beff46..f2c792c9cdf6 100644 > > --- a/tests/ovn-controller.at > > +++ b/tests/ovn-controller.at > > @@ -2325,14 +2325,15 @@ AT_CHECK_UNQUOTED([echo $lflow_run_1], [0], [$lflow_run_2 > > ]) > > > > # Restart OVS this time. Flows should be reinstalled without waiting. > > +# Set the wait-before-clear to a large value (60s) to make the test more reliable. > > +check ovs-vsctl set open . external_ids:ovn-ofctrl-wait-before-clear=60000 > > +check ovn-nbctl --wait=hv sync > > + > > OVS_APP_EXIT_AND_WAIT([ovs-vswitchd]) > > start_daemon ovs-vswitchd --enable-dummy=system -vvconn -vofproto_dpif -vunixctl > > > > -# Sync to make sure ovn-controller is given enough time to install the flows. > > -check ovn-nbctl --wait=hv sync > > - > > -# Flow should be installed without any extra waiting. > > -AT_CHECK([ovs-ofctl dump-flows br-int | grep -F 10.1.2.4 | grep -vF 2.2.2.2], [0], [ignore]) > > +# Flow should be installed without waiting for another 60s. > > +OVS_WAIT_UNTIL([ovs-ofctl dump-flows br-int | grep -F 10.1.2.4 | grep -vF 2.2.2.2]) > > > > check ovn-nbctl --wait=hv lb-add lb3 3.3.3.3 10.1.2.5 \ > > -- ls-lb-add ls1 lb3 >
diff --git a/tests/ovn-controller.at b/tests/ovn-controller.at index 3202f0beff46..f2c792c9cdf6 100644 --- a/tests/ovn-controller.at +++ b/tests/ovn-controller.at @@ -2325,14 +2325,15 @@ AT_CHECK_UNQUOTED([echo $lflow_run_1], [0], [$lflow_run_2 ]) # Restart OVS this time. Flows should be reinstalled without waiting. +# Set the wait-before-clear to a large value (60s) to make the test more reliable. +check ovs-vsctl set open . external_ids:ovn-ofctrl-wait-before-clear=60000 +check ovn-nbctl --wait=hv sync + OVS_APP_EXIT_AND_WAIT([ovs-vswitchd]) start_daemon ovs-vswitchd --enable-dummy=system -vvconn -vofproto_dpif -vunixctl -# Sync to make sure ovn-controller is given enough time to install the flows. -check ovn-nbctl --wait=hv sync - -# Flow should be installed without any extra waiting. -AT_CHECK([ovs-ofctl dump-flows br-int | grep -F 10.1.2.4 | grep -vF 2.2.2.2], [0], [ignore]) +# Flow should be installed without waiting for another 60s. +OVS_WAIT_UNTIL([ovs-ofctl dump-flows br-int | grep -F 10.1.2.4 | grep -vF 2.2.2.2]) check ovn-nbctl --wait=hv lb-add lb3 3.3.3.3 10.1.2.5 \ -- ls-lb-add ls1 lb3
Fixes: bbf2f941965a ("ofctrl: Wait at S_WAIT_BEFORE_CLEAR only once.") Signed-off-by: Han Zhou <hzhou@ovn.org> --- tests/ovn-controller.at | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-)