Message ID | 20240604140537.1623335-1-amusil@redhat.com |
---|---|
State | Accepted |
Headers | show |
Series | [ovs-dev,v2] tests: Fix flaky PMUTD flows test. | 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 |
Hi Ales On Tue, Jun 4, 2024 at 4:06 PM Ales Musil <amusil@redhat.com> wrote: > Add missing sync calls to make sure that the flows are present and > strip the statistics from the flows. Also make sure that we have > configured tunnel keys so it doesn't change between invocations > and remove loads of the CT zones. > > Fixes: 3faadc76ad71 ("northd: Fix pmtud for non routed traffic.") > Signed-off-by: Ales Musil <amusil@redhat.com> > --- > v2: Make sure we do not flake on changes of CT zones. > --- > tests/ovn-controller.at | 51 +++++++++++++++++++++++------------------ > 1 file changed, 29 insertions(+), 22 deletions(-) > > diff --git a/tests/ovn-controller.at b/tests/ovn-controller.at > index fc50b6ff8..f5b335a8e 100644 > --- a/tests/ovn-controller.at > +++ b/tests/ovn-controller.at > @@ -3024,10 +3024,13 @@ ovs-vsctl add-br br-phys > ovn_attach n1 br-phys 192.168.0.1 > > check ovn-nbctl ls-add ls1 \ > + -- set logical_switch ls1 other-config:requested-tnl-key=1 \ > -- lsp-add ls1 lsp1 \ > -- lsp-set-addresses lsp1 "00:00:00:00:00:01 192.168.1.1" \ > + -- set logical_switch_port lsp1 options:requested-tnl-key=1 \ > -- lsp-add ls1 lsp2 \ > - -- lsp-set-addresses lsp2 "00:00:00:00:00:02 192.168.1.2" > + -- lsp-set-addresses lsp2 "00:00:00:00:00:02 192.168.1.2" \ > + -- set logical_switch_port lsp2 options:requested-tnl-key=2 > > as hv1 > check ovs-vsctl \ > @@ -3036,39 +3039,43 @@ check ovs-vsctl \ > -- add-port br-int vif2 \ > -- set Interface vif2 external_ids:iface-id=lsp2 > > +wait_for_ports_up > +check ovn-nbctl --wait=hv sync > + > AT_CHECK([as hv1 ovs-ofctl dump-flows br-int table=OFTABLE_CT_ZONE_LOOKUP > | \ > - sed -e 's/cookie=0x.*, duration=.*, table/cookie=??, > duration=??, table/' | \ > - sed -e > 's/actions=load:0x.*->NXM_NX_REG13/actions=load:0x?->NXM_NX_REG13/' | \ > - grep -v NXST_FLOW |sort], [0], [dnl > - cookie=??, duration=??, table=OFTABLE_CT_ZONE_LOOKUP, n_packets=0, > n_bytes=0, idle_age=0, priority=0 > actions=resubmit(,OFTABLE_LOG_INGRESS_PIPELINE) > - cookie=??, duration=??, table=OFTABLE_CT_ZONE_LOOKUP, n_packets=0, > n_bytes=0, idle_age=0, priority=100,reg14=0x1,metadata=0x1 > actions=load:0x?->NXM_NX_REG13[[0..15]],load:0x2->NXM_NX_REG11[[]],load:0x1->NXM_NX_REG12[[]],resubmit(,OFTABLE_LOG_INGRESS_PIPELINE) > - cookie=??, duration=??, table=OFTABLE_CT_ZONE_LOOKUP, n_packets=0, > n_bytes=0, idle_age=0, priority=100,reg14=0x2,metadata=0x1 > actions=load:0x?->NXM_NX_REG13[[0..15]],load:0x2->NXM_NX_REG11[[]],load:0x1->NXM_NX_REG12[[]],resubmit(,OFTABLE_LOG_INGRESS_PIPELINE) > + sed -e 's/load:0x[[0-9]]\+/load:0x?/g' | grep -v NXST_FLOW | \ > + awk '{print $7, $8}' | sort], [0], [dnl > +priority=0 actions=resubmit(,OFTABLE_LOG_INGRESS_PIPELINE) > +priority=100,reg14=0x1,metadata=0x1 > actions=load:0x?->NXM_NX_REG13[[0..15]],load:0x?->NXM_NX_REG11[[]],load:0x?->NXM_NX_REG12[[]],resubmit(,OFTABLE_LOG_INGRESS_PIPELINE) > +priority=100,reg14=0x2,metadata=0x1 > actions=load:0x?->NXM_NX_REG13[[0..15]],load:0x?->NXM_NX_REG11[[]],load:0x?->NXM_NX_REG12[[]],resubmit(,OFTABLE_LOG_INGRESS_PIPELINE) > ]) > > check ovn-nbctl lsp-add ls1 lsp3 \ > - -- lsp-set-addresses lsp3 "00:00:00:00:00:03 192.168.1.3" > + -- lsp-set-addresses lsp3 "00:00:00:00:00:03 192.168.1.3" \ > + -- set logical_switch_port lsp3 options:requested-tnl-key=3 > check ovs-vsctl \ > -- add-port br-int vif3 \ > -- set Interface vif3 external_ids:iface-id=lsp3 > > +wait_for_ports_up > +check ovn-nbctl --wait=hv sync > + > AT_CHECK([as hv1 ovs-ofctl dump-flows br-int table=OFTABLE_CT_ZONE_LOOKUP > | \ > - sed -e 's/cookie=0x.*, duration=.*, table/cookie=??, > duration=??, table/' | \ > - sed -e > 's/actions=load:0x.*->NXM_NX_REG13/actions=load:0x?->NXM_NX_REG13/' | \ > - grep -v NXST_FLOW |sort], [0], [dnl > - cookie=??, duration=??, table=OFTABLE_CT_ZONE_LOOKUP, n_packets=0, > n_bytes=0, idle_age=0, priority=0 > actions=resubmit(,OFTABLE_LOG_INGRESS_PIPELINE) > - cookie=??, duration=??, table=OFTABLE_CT_ZONE_LOOKUP, n_packets=0, > n_bytes=0, idle_age=0, priority=100,reg14=0x1,metadata=0x1 > actions=load:0x?->NXM_NX_REG13[[0..15]],load:0x2->NXM_NX_REG11[[]],load:0x1->NXM_NX_REG12[[]],resubmit(,OFTABLE_LOG_INGRESS_PIPELINE) > - cookie=??, duration=??, table=OFTABLE_CT_ZONE_LOOKUP, n_packets=0, > n_bytes=0, idle_age=0, priority=100,reg14=0x2,metadata=0x1 > actions=load:0x?->NXM_NX_REG13[[0..15]],load:0x2->NXM_NX_REG11[[]],load:0x1->NXM_NX_REG12[[]],resubmit(,OFTABLE_LOG_INGRESS_PIPELINE) > - cookie=??, duration=??, table=OFTABLE_CT_ZONE_LOOKUP, n_packets=0, > n_bytes=0, idle_age=0, priority=100,reg14=0x3,metadata=0x1 > actions=load:0x?->NXM_NX_REG13[[0..15]],load:0x2->NXM_NX_REG11[[]],load:0x1->NXM_NX_REG12[[]],resubmit(,OFTABLE_LOG_INGRESS_PIPELINE) > + sed -e 's/load:0x[[0-9]]\+/load:0x?/g' | grep -v NXST_FLOW | \ > + awk '{print $7, $8}' | sort], [0], [dnl > +priority=0 actions=resubmit(,OFTABLE_LOG_INGRESS_PIPELINE) > +priority=100,reg14=0x1,metadata=0x1 > actions=load:0x?->NXM_NX_REG13[[0..15]],load:0x?->NXM_NX_REG11[[]],load:0x?->NXM_NX_REG12[[]],resubmit(,OFTABLE_LOG_INGRESS_PIPELINE) > +priority=100,reg14=0x2,metadata=0x1 > actions=load:0x?->NXM_NX_REG13[[0..15]],load:0x?->NXM_NX_REG11[[]],load:0x?->NXM_NX_REG12[[]],resubmit(,OFTABLE_LOG_INGRESS_PIPELINE) > +priority=100,reg14=0x3,metadata=0x1 > actions=load:0x?->NXM_NX_REG13[[0..15]],load:0x?->NXM_NX_REG11[[]],load:0x?->NXM_NX_REG12[[]],resubmit(,OFTABLE_LOG_INGRESS_PIPELINE) > ]) > > -check ovn-nbctl lsp-del lsp3 > +check ovn-nbctl --wait=hv lsp-del lsp3 > AT_CHECK([as hv1 ovs-ofctl dump-flows br-int table=OFTABLE_CT_ZONE_LOOKUP > | \ > - sed -e 's/cookie=0x.*, duration=.*, table/cookie=??, > duration=??, table/' | \ > - sed -e > 's/actions=load:0x.*->NXM_NX_REG13/actions=load:0x?->NXM_NX_REG13/' | > - grep -v NXST_FLOW |sort], [0], [dnl > - cookie=??, duration=??, table=OFTABLE_CT_ZONE_LOOKUP, n_packets=0, > n_bytes=0, idle_age=0, priority=0 > actions=resubmit(,OFTABLE_LOG_INGRESS_PIPELINE) > - cookie=??, duration=??, table=OFTABLE_CT_ZONE_LOOKUP, n_packets=0, > n_bytes=0, idle_age=0, priority=100,reg14=0x1,metadata=0x1 > actions=load:0x?->NXM_NX_REG13[[0..15]],load:0x2->NXM_NX_REG11[[]],load:0x1->NXM_NX_REG12[[]],resubmit(,OFTABLE_LOG_INGRESS_PIPELINE) > - cookie=??, duration=??, table=OFTABLE_CT_ZONE_LOOKUP, n_packets=0, > n_bytes=0, idle_age=0, priority=100,reg14=0x2,metadata=0x1 > actions=load:0x?->NXM_NX_REG13[[0..15]],load:0x2->NXM_NX_REG11[[]],load:0x1->NXM_NX_REG12[[]],resubmit(,OFTABLE_LOG_INGRESS_PIPELINE) > + sed -e 's/load:0x[[0-9]]\+/load:0x?/g' | grep -v NXST_FLOW | \ > + awk '{print $7, $8}' | sort], [0], [dnl > +priority=0 actions=resubmit(,OFTABLE_LOG_INGRESS_PIPELINE) > +priority=100,reg14=0x1,metadata=0x1 > actions=load:0x?->NXM_NX_REG13[[0..15]],load:0x?->NXM_NX_REG11[[]],load:0x?->NXM_NX_REG12[[]],resubmit(,OFTABLE_LOG_INGRESS_PIPELINE) > +priority=100,reg14=0x2,metadata=0x1 > actions=load:0x?->NXM_NX_REG13[[0..15]],load:0x?->NXM_NX_REG11[[]],load:0x?->NXM_NX_REG12[[]],resubmit(,OFTABLE_LOG_INGRESS_PIPELINE) > ]) > > OVN_CLEANUP([hv1]) > -- > 2.45.1 > > Looks good to me, thanks! Acked-by: Xavier Simonart <xsimonar@redhat.com> > _______________________________________________ > dev mailing list > dev@openvswitch.org > https://mail.openvswitch.org/mailman/listinfo/ovs-dev > >
On 6/4/24 16:05, Ales Musil wrote: > Add missing sync calls to make sure that the flows are present and > strip the statistics from the flows. Also make sure that we have > configured tunnel keys so it doesn't change between invocations > and remove loads of the CT zones. > > Fixes: 3faadc76ad71 ("northd: Fix pmtud for non routed traffic.") > Signed-off-by: Ales Musil <amusil@redhat.com> > --- > v2: Make sure we do not flake on changes of CT zones. > --- Thanks, Ales and Xavier! I applied this patch to main. Regards, Dumitru
diff --git a/tests/ovn-controller.at b/tests/ovn-controller.at index fc50b6ff8..f5b335a8e 100644 --- a/tests/ovn-controller.at +++ b/tests/ovn-controller.at @@ -3024,10 +3024,13 @@ ovs-vsctl add-br br-phys ovn_attach n1 br-phys 192.168.0.1 check ovn-nbctl ls-add ls1 \ + -- set logical_switch ls1 other-config:requested-tnl-key=1 \ -- lsp-add ls1 lsp1 \ -- lsp-set-addresses lsp1 "00:00:00:00:00:01 192.168.1.1" \ + -- set logical_switch_port lsp1 options:requested-tnl-key=1 \ -- lsp-add ls1 lsp2 \ - -- lsp-set-addresses lsp2 "00:00:00:00:00:02 192.168.1.2" + -- lsp-set-addresses lsp2 "00:00:00:00:00:02 192.168.1.2" \ + -- set logical_switch_port lsp2 options:requested-tnl-key=2 as hv1 check ovs-vsctl \ @@ -3036,39 +3039,43 @@ check ovs-vsctl \ -- add-port br-int vif2 \ -- set Interface vif2 external_ids:iface-id=lsp2 +wait_for_ports_up +check ovn-nbctl --wait=hv sync + AT_CHECK([as hv1 ovs-ofctl dump-flows br-int table=OFTABLE_CT_ZONE_LOOKUP | \ - sed -e 's/cookie=0x.*, duration=.*, table/cookie=??, duration=??, table/' | \ - sed -e 's/actions=load:0x.*->NXM_NX_REG13/actions=load:0x?->NXM_NX_REG13/' | \ - grep -v NXST_FLOW |sort], [0], [dnl - cookie=??, duration=??, table=OFTABLE_CT_ZONE_LOOKUP, n_packets=0, n_bytes=0, idle_age=0, priority=0 actions=resubmit(,OFTABLE_LOG_INGRESS_PIPELINE) - cookie=??, duration=??, table=OFTABLE_CT_ZONE_LOOKUP, n_packets=0, n_bytes=0, idle_age=0, priority=100,reg14=0x1,metadata=0x1 actions=load:0x?->NXM_NX_REG13[[0..15]],load:0x2->NXM_NX_REG11[[]],load:0x1->NXM_NX_REG12[[]],resubmit(,OFTABLE_LOG_INGRESS_PIPELINE) - cookie=??, duration=??, table=OFTABLE_CT_ZONE_LOOKUP, n_packets=0, n_bytes=0, idle_age=0, priority=100,reg14=0x2,metadata=0x1 actions=load:0x?->NXM_NX_REG13[[0..15]],load:0x2->NXM_NX_REG11[[]],load:0x1->NXM_NX_REG12[[]],resubmit(,OFTABLE_LOG_INGRESS_PIPELINE) + sed -e 's/load:0x[[0-9]]\+/load:0x?/g' | grep -v NXST_FLOW | \ + awk '{print $7, $8}' | sort], [0], [dnl +priority=0 actions=resubmit(,OFTABLE_LOG_INGRESS_PIPELINE) +priority=100,reg14=0x1,metadata=0x1 actions=load:0x?->NXM_NX_REG13[[0..15]],load:0x?->NXM_NX_REG11[[]],load:0x?->NXM_NX_REG12[[]],resubmit(,OFTABLE_LOG_INGRESS_PIPELINE) +priority=100,reg14=0x2,metadata=0x1 actions=load:0x?->NXM_NX_REG13[[0..15]],load:0x?->NXM_NX_REG11[[]],load:0x?->NXM_NX_REG12[[]],resubmit(,OFTABLE_LOG_INGRESS_PIPELINE) ]) check ovn-nbctl lsp-add ls1 lsp3 \ - -- lsp-set-addresses lsp3 "00:00:00:00:00:03 192.168.1.3" + -- lsp-set-addresses lsp3 "00:00:00:00:00:03 192.168.1.3" \ + -- set logical_switch_port lsp3 options:requested-tnl-key=3 check ovs-vsctl \ -- add-port br-int vif3 \ -- set Interface vif3 external_ids:iface-id=lsp3 +wait_for_ports_up +check ovn-nbctl --wait=hv sync + AT_CHECK([as hv1 ovs-ofctl dump-flows br-int table=OFTABLE_CT_ZONE_LOOKUP | \ - sed -e 's/cookie=0x.*, duration=.*, table/cookie=??, duration=??, table/' | \ - sed -e 's/actions=load:0x.*->NXM_NX_REG13/actions=load:0x?->NXM_NX_REG13/' | \ - grep -v NXST_FLOW |sort], [0], [dnl - cookie=??, duration=??, table=OFTABLE_CT_ZONE_LOOKUP, n_packets=0, n_bytes=0, idle_age=0, priority=0 actions=resubmit(,OFTABLE_LOG_INGRESS_PIPELINE) - cookie=??, duration=??, table=OFTABLE_CT_ZONE_LOOKUP, n_packets=0, n_bytes=0, idle_age=0, priority=100,reg14=0x1,metadata=0x1 actions=load:0x?->NXM_NX_REG13[[0..15]],load:0x2->NXM_NX_REG11[[]],load:0x1->NXM_NX_REG12[[]],resubmit(,OFTABLE_LOG_INGRESS_PIPELINE) - cookie=??, duration=??, table=OFTABLE_CT_ZONE_LOOKUP, n_packets=0, n_bytes=0, idle_age=0, priority=100,reg14=0x2,metadata=0x1 actions=load:0x?->NXM_NX_REG13[[0..15]],load:0x2->NXM_NX_REG11[[]],load:0x1->NXM_NX_REG12[[]],resubmit(,OFTABLE_LOG_INGRESS_PIPELINE) - cookie=??, duration=??, table=OFTABLE_CT_ZONE_LOOKUP, n_packets=0, n_bytes=0, idle_age=0, priority=100,reg14=0x3,metadata=0x1 actions=load:0x?->NXM_NX_REG13[[0..15]],load:0x2->NXM_NX_REG11[[]],load:0x1->NXM_NX_REG12[[]],resubmit(,OFTABLE_LOG_INGRESS_PIPELINE) + sed -e 's/load:0x[[0-9]]\+/load:0x?/g' | grep -v NXST_FLOW | \ + awk '{print $7, $8}' | sort], [0], [dnl +priority=0 actions=resubmit(,OFTABLE_LOG_INGRESS_PIPELINE) +priority=100,reg14=0x1,metadata=0x1 actions=load:0x?->NXM_NX_REG13[[0..15]],load:0x?->NXM_NX_REG11[[]],load:0x?->NXM_NX_REG12[[]],resubmit(,OFTABLE_LOG_INGRESS_PIPELINE) +priority=100,reg14=0x2,metadata=0x1 actions=load:0x?->NXM_NX_REG13[[0..15]],load:0x?->NXM_NX_REG11[[]],load:0x?->NXM_NX_REG12[[]],resubmit(,OFTABLE_LOG_INGRESS_PIPELINE) +priority=100,reg14=0x3,metadata=0x1 actions=load:0x?->NXM_NX_REG13[[0..15]],load:0x?->NXM_NX_REG11[[]],load:0x?->NXM_NX_REG12[[]],resubmit(,OFTABLE_LOG_INGRESS_PIPELINE) ]) -check ovn-nbctl lsp-del lsp3 +check ovn-nbctl --wait=hv lsp-del lsp3 AT_CHECK([as hv1 ovs-ofctl dump-flows br-int table=OFTABLE_CT_ZONE_LOOKUP | \ - sed -e 's/cookie=0x.*, duration=.*, table/cookie=??, duration=??, table/' | \ - sed -e 's/actions=load:0x.*->NXM_NX_REG13/actions=load:0x?->NXM_NX_REG13/' | - grep -v NXST_FLOW |sort], [0], [dnl - cookie=??, duration=??, table=OFTABLE_CT_ZONE_LOOKUP, n_packets=0, n_bytes=0, idle_age=0, priority=0 actions=resubmit(,OFTABLE_LOG_INGRESS_PIPELINE) - cookie=??, duration=??, table=OFTABLE_CT_ZONE_LOOKUP, n_packets=0, n_bytes=0, idle_age=0, priority=100,reg14=0x1,metadata=0x1 actions=load:0x?->NXM_NX_REG13[[0..15]],load:0x2->NXM_NX_REG11[[]],load:0x1->NXM_NX_REG12[[]],resubmit(,OFTABLE_LOG_INGRESS_PIPELINE) - cookie=??, duration=??, table=OFTABLE_CT_ZONE_LOOKUP, n_packets=0, n_bytes=0, idle_age=0, priority=100,reg14=0x2,metadata=0x1 actions=load:0x?->NXM_NX_REG13[[0..15]],load:0x2->NXM_NX_REG11[[]],load:0x1->NXM_NX_REG12[[]],resubmit(,OFTABLE_LOG_INGRESS_PIPELINE) + sed -e 's/load:0x[[0-9]]\+/load:0x?/g' | grep -v NXST_FLOW | \ + awk '{print $7, $8}' | sort], [0], [dnl +priority=0 actions=resubmit(,OFTABLE_LOG_INGRESS_PIPELINE) +priority=100,reg14=0x1,metadata=0x1 actions=load:0x?->NXM_NX_REG13[[0..15]],load:0x?->NXM_NX_REG11[[]],load:0x?->NXM_NX_REG12[[]],resubmit(,OFTABLE_LOG_INGRESS_PIPELINE) +priority=100,reg14=0x2,metadata=0x1 actions=load:0x?->NXM_NX_REG13[[0..15]],load:0x?->NXM_NX_REG11[[]],load:0x?->NXM_NX_REG12[[]],resubmit(,OFTABLE_LOG_INGRESS_PIPELINE) ]) OVN_CLEANUP([hv1])
Add missing sync calls to make sure that the flows are present and strip the statistics from the flows. Also make sure that we have configured tunnel keys so it doesn't change between invocations and remove loads of the CT zones. Fixes: 3faadc76ad71 ("northd: Fix pmtud for non routed traffic.") Signed-off-by: Ales Musil <amusil@redhat.com> --- v2: Make sure we do not flake on changes of CT zones. --- tests/ovn-controller.at | 51 +++++++++++++++++++++++------------------ 1 file changed, 29 insertions(+), 22 deletions(-)