Message ID | 20240110124045.778257-1-amusil@redhat.com |
---|---|
State | Accepted |
Headers | show |
Series | [ovs-dev,1/2] tests: Reduce flakiness of daemon ssl files change 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 |
Thanks Ales, it looks good to me. Acked-by: Mark Michelson <mmichels@redhat.com> On 1/10/24 07:40, Ales Musil wrote: > The test is changing certificates when the ovn-nbctl is running > as daemon and expects that the mismatch will be detected. In most > cases this is fine because the main loop of the ovn-nbctl will be > woken up by something external. However, when the host is busy it might > not be woken up in time. > > Wake the daemon right away by calling show command. At the same time > ensure that there is only 1 mismatch after the whole process. > > Signed-off-by: Ales Musil <amusil@redhat.com> > --- > tests/ovn-nbctl.at | 6 ++++++ > 1 file changed, 6 insertions(+) > > diff --git a/tests/ovn-nbctl.at b/tests/ovn-nbctl.at > index 2d74e9cc6..7f37d7716 100644 > --- a/tests/ovn-nbctl.at > +++ b/tests/ovn-nbctl.at > @@ -2736,11 +2736,17 @@ check ovn-appctl -t ovn-nbctl run init > # Overwrite with mismatched key and cert > cp $PKIDIR/$key2 $key > cp $PKIDIR/$cert3 $cert > + > +# Wakeup the ovn-nbctl loop > +ovn-appctl -t ovn-nbctl run show > OVS_WAIT_UNTIL([grep mismatch ovn-nbctl.log]) > > cp $PKIDIR/$key $key > cp $PKIDIR/$cert $cert > OVS_WAIT_UNTIL([ovn-appctl -t ovn-nbctl run show]) > +AT_CHECK([grep -c mismatch ovn-nbctl.log], [0], [dnl > +1 > +]) > > AT_CLEANUP >
On Tue, Jan 16, 2024 at 4:42 PM Mark Michelson <mmichels@redhat.com> wrote: > > Thanks Ales, it looks good to me. > > Acked-by: Mark Michelson <mmichels@redhat.com> Thanks. Applied to the main. Numan > > On 1/10/24 07:40, Ales Musil wrote: > > The test is changing certificates when the ovn-nbctl is running > > as daemon and expects that the mismatch will be detected. In most > > cases this is fine because the main loop of the ovn-nbctl will be > > woken up by something external. However, when the host is busy it might > > not be woken up in time. > > > > Wake the daemon right away by calling show command. At the same time > > ensure that there is only 1 mismatch after the whole process. > > > > Signed-off-by: Ales Musil <amusil@redhat.com> > > --- > > tests/ovn-nbctl.at | 6 ++++++ > > 1 file changed, 6 insertions(+) > > > > diff --git a/tests/ovn-nbctl.at b/tests/ovn-nbctl.at > > index 2d74e9cc6..7f37d7716 100644 > > --- a/tests/ovn-nbctl.at > > +++ b/tests/ovn-nbctl.at > > @@ -2736,11 +2736,17 @@ check ovn-appctl -t ovn-nbctl run init > > # Overwrite with mismatched key and cert > > cp $PKIDIR/$key2 $key > > cp $PKIDIR/$cert3 $cert > > + > > +# Wakeup the ovn-nbctl loop > > +ovn-appctl -t ovn-nbctl run show > > OVS_WAIT_UNTIL([grep mismatch ovn-nbctl.log]) > > > > cp $PKIDIR/$key $key > > cp $PKIDIR/$cert $cert > > OVS_WAIT_UNTIL([ovn-appctl -t ovn-nbctl run show]) > > +AT_CHECK([grep -c mismatch ovn-nbctl.log], [0], [dnl > > +1 > > +]) > > > > AT_CLEANUP > > > > _______________________________________________ > dev mailing list > dev@openvswitch.org > https://mail.openvswitch.org/mailman/listinfo/ovs-dev >
diff --git a/tests/ovn-nbctl.at b/tests/ovn-nbctl.at index 2d74e9cc6..7f37d7716 100644 --- a/tests/ovn-nbctl.at +++ b/tests/ovn-nbctl.at @@ -2736,11 +2736,17 @@ check ovn-appctl -t ovn-nbctl run init # Overwrite with mismatched key and cert cp $PKIDIR/$key2 $key cp $PKIDIR/$cert3 $cert + +# Wakeup the ovn-nbctl loop +ovn-appctl -t ovn-nbctl run show OVS_WAIT_UNTIL([grep mismatch ovn-nbctl.log]) cp $PKIDIR/$key $key cp $PKIDIR/$cert $cert OVS_WAIT_UNTIL([ovn-appctl -t ovn-nbctl run show]) +AT_CHECK([grep -c mismatch ovn-nbctl.log], [0], [dnl +1 +]) AT_CLEANUP
The test is changing certificates when the ovn-nbctl is running as daemon and expects that the mismatch will be detected. In most cases this is fine because the main loop of the ovn-nbctl will be woken up by something external. However, when the host is busy it might not be woken up in time. Wake the daemon right away by calling show command. At the same time ensure that there is only 1 mismatch after the whole process. Signed-off-by: Ales Musil <amusil@redhat.com> --- tests/ovn-nbctl.at | 6 ++++++ 1 file changed, 6 insertions(+)