diff mbox series

[ovs-dev,2/2] ipsec.at: Fix ipsec test flake

Message ID 20210712172759.550865-3-mark.d.gray@redhat.com
State Superseded, archived
Headers show
Series tests: Fix test flakes | expand

Checks

Context Check Description
ovsrobot/apply-robot success apply and check: success

Commit Message

Mark Gray July 12, 2021, 5:27 p.m. UTC
Change order of command execution and add `ovn-nbctl --wait=hv sync`.
This ensures the vswitchd ovsdb instance is updated by the time
it is checked.

Fixes: ff2b6ff69740 ("ovn-controller: Add 'local_ip' option to tunnel ports for IPsec case")
Signed-off-by: Mark Gray <mark.d.gray@redhat.com>
---
 tests/ovn-ipsec.at | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

Comments

Dumitru Ceara July 13, 2021, 9:05 a.m. UTC | #1
On 7/12/21 7:27 PM, Mark Gray wrote:
> Change order of command execution and add `ovn-nbctl --wait=hv sync`.
> This ensures the vswitchd ovsdb instance is updated by the time
> it is checked.
> 
> Fixes: ff2b6ff69740 ("ovn-controller: Add 'local_ip' option to tunnel ports for IPsec case")
> Signed-off-by: Mark Gray <mark.d.gray@redhat.com>
> ---

Looks good to me, thanks!

Acked-by: Dumitru Ceara <dceara@redhat.com>
diff mbox series

Patch

diff --git a/tests/ovn-ipsec.at b/tests/ovn-ipsec.at
index 389ccff5836a..4c600a9f2779 100644
--- a/tests/ovn-ipsec.at
+++ b/tests/ovn-ipsec.at
@@ -14,9 +14,6 @@  ovn-nbctl lsp-set-addresses lp2 "f0:00:00:00:00:02 10.1.1.2"
 
 net_add n1               # Network to connect hv1 and hv2
 
-# Enable IPsec
-ovn-nbctl set nb_global . ipsec=true
-
 # Create hypervisor hv1 connected to n1
 sim_add hv1
 as hv1
@@ -45,6 +42,11 @@  ovs-vsctl \
     -- set Open_vSwitch . other_config:private_key=dummy-privkey.pem \
     -- set Open_vSwitch . other_config:ca_cert=dummy-cacert.pem
 
+# Enable IPsec
+ovn-nbctl set nb_global . ipsec=true
+
+check ovn-nbctl --wait=hv sync
+
 AT_CHECK([as hv2 ovs-vsctl get Interface ovn-hv1-0 options:remote_ip | tr -d '"\n'], [0], [192.168.0.1])
 AT_CHECK([as hv2 ovs-vsctl get Interface ovn-hv1-0 options:local_ip | tr -d '"\n'], [0], [192.168.0.2])
 AT_CHECK([as hv2 ovs-vsctl get Interface ovn-hv1-0 options:remote_name | tr -d '\n'], [0], [hv1])