diff mbox series

[ovs-dev,v2] ovs: Bump submodule to newer version and add related test

Message ID 20220928150101.560563-1-xsimonar@redhat.com
State Accepted
Headers show
Series [ovs-dev,v2] ovs: Bump submodule to newer version and add related test | expand

Commit Message

Xavier Simonart Sept. 28, 2022, 3:01 p.m. UTC
Specifically for:
02f31a1262fc ("ovsdb-idl: Preserve references for rows deleted in same IDL run as their insertion.")

A OVN test case reproducing the bug (issue when port_binding is added/deleted within the
same IDL) is also added.

Reported-at: https://bugzilla.redhat.com/show_bug.cgi?id=2126450

Signed-off-by: Xavier Simonart <xsimonar@redhat.com>
---
v2: updated ovs commit ID
---
 ovs          |  2 +-
 tests/ovn.at | 29 +++++++++++++++++++++++++++++
 2 files changed, 30 insertions(+), 1 deletion(-)

Comments

Dumitru Ceara Sept. 29, 2022, 11:31 a.m. UTC | #1
On 9/28/22 17:01, Xavier Simonart wrote:
> Specifically for:
> 02f31a1262fc ("ovsdb-idl: Preserve references for rows deleted in same IDL run as their insertion.")
> 
> A OVN test case reproducing the bug (issue when port_binding is added/deleted within the
> same IDL) is also added.
> 
> Reported-at: https://bugzilla.redhat.com/show_bug.cgi?id=2126450
> 
> Signed-off-by: Xavier Simonart <xsimonar@redhat.com>
> ---
> v2: updated ovs commit ID
> ---
>  ovs          |  2 +-
>  tests/ovn.at | 29 +++++++++++++++++++++++++++++
>  2 files changed, 30 insertions(+), 1 deletion(-)
> 
> diff --git a/ovs b/ovs
> index 6f24c2bc7..5a686267d 160000
> --- a/ovs
> +++ b/ovs
> @@ -1 +1 @@
> -Subproject commit 6f24c2bc769afde0a390ce344de1a7d9c592e5a6
> +Subproject commit 5a686267d36c5c4229ec801a9616ceb60740fbe3
> diff --git a/tests/ovn.at b/tests/ovn.at
> index 07f72dc31..739c09934 100644
> --- a/tests/ovn.at
> +++ b/tests/ovn.at
> @@ -32946,3 +32946,32 @@ check ovn-nbctl --wait=hv sync
>  OVN_CLEANUP([hv1])
>  AT_CLEANUP
>  ])
> +
> +OVN_FOR_EACH_NORTHD([
> +AT_SETUP([ovn-controller: batch add port and delete port in same IDL])
> +ovn_start
> +net_add n1
> +
> +sim_add hv1
> +as hv1
> +ovs-vsctl add-br br-phys
> +ovn_attach n1 br-phys 192.168.0.1
> +check ovs-vsctl add-port br-int p1
> +
> +ovs-vsctl set interface p1 external-ids:iface-id=sw0-port1
> +check ovn-nbctl --wait=hv sync
> +ovn-appctl debug/pause
> +OVS_WAIT_UNTIL([test x$(as hv1 ovn-appctl -t ovn-controller debug/status) = "xpaused"])
> +
> +ovn-nbctl ls-add sw0 -- lsp-add sw0 sw0-port1 -- lsp-set-addresses sw0-port1 "50:54:00:00:00:01 192.168.0.2"
> +ovn-nbctl lsp-del sw0-port1
> +
> +ovn-appctl debug/resume
> +check ovn-nbctl --wait=hv sync
> +
> +ovn-nbctl ls-del sw0
> +check ovn-nbctl --wait=hv sync
> +OVN_CLEANUP([hv1])
> +AT_CLEANUP
> +])
> +

Thanks for the patch, Xavier!  I applied it to the main branch with the
minor incremental test changes we discussed offline.  I'm adding them
here too for reference:

diff --git a/tests/ovn.at b/tests/ovn.at
index 739c09934..0dc23dbd2 100644
--- a/tests/ovn.at
+++ b/tests/ovn.at
@@ -32958,20 +32958,20 @@ ovs-vsctl add-br br-phys
 ovn_attach n1 br-phys 192.168.0.1
 check ovs-vsctl add-port br-int p1

-ovs-vsctl set interface p1 external-ids:iface-id=sw0-port1
+check ovs-vsctl set interface p1 external-ids:iface-id=sw0-port1
 check ovn-nbctl --wait=hv sync
 ovn-appctl debug/pause
 OVS_WAIT_UNTIL([test x$(as hv1 ovn-appctl -t ovn-controller debug/status) = "xpaused"])

-ovn-nbctl ls-add sw0 -- lsp-add sw0 sw0-port1 -- lsp-set-addresses sw0-port1 "50:54:00:00:00:01 192.168.0.2"
-ovn-nbctl lsp-del sw0-port1
+check ovn-nbctl ls-add sw0 -- lsp-add sw0 sw0-port1
+check ovn-nbctl lsp-del sw0-port1
+check ovn-nbctl --wait=sb sync

 ovn-appctl debug/resume
 check ovn-nbctl --wait=hv sync

-ovn-nbctl ls-del sw0
+check ovn-nbctl ls-del sw0
 check ovn-nbctl --wait=hv sync
 OVN_CLEANUP([hv1])
 AT_CLEANUP
 ])
-
Dumitru Ceara Sept. 29, 2022, 11:36 a.m. UTC | #2
On 9/29/22 13:31, Dumitru Ceara wrote:
> On 9/28/22 17:01, Xavier Simonart wrote:
>> Specifically for:
>> 02f31a1262fc ("ovsdb-idl: Preserve references for rows deleted in same IDL run as their insertion.")
>>

I forgot to mention in the previous email, but would you have time to
also post backport patches to fix the crash for stable branches (down to
22.03 LTS) too?

Thanks,
Dumitru
diff mbox series

Patch

diff --git a/ovs b/ovs
index 6f24c2bc7..5a686267d 160000
--- a/ovs
+++ b/ovs
@@ -1 +1 @@ 
-Subproject commit 6f24c2bc769afde0a390ce344de1a7d9c592e5a6
+Subproject commit 5a686267d36c5c4229ec801a9616ceb60740fbe3
diff --git a/tests/ovn.at b/tests/ovn.at
index 07f72dc31..739c09934 100644
--- a/tests/ovn.at
+++ b/tests/ovn.at
@@ -32946,3 +32946,32 @@  check ovn-nbctl --wait=hv sync
 OVN_CLEANUP([hv1])
 AT_CLEANUP
 ])
+
+OVN_FOR_EACH_NORTHD([
+AT_SETUP([ovn-controller: batch add port and delete port in same IDL])
+ovn_start
+net_add n1
+
+sim_add hv1
+as hv1
+ovs-vsctl add-br br-phys
+ovn_attach n1 br-phys 192.168.0.1
+check ovs-vsctl add-port br-int p1
+
+ovs-vsctl set interface p1 external-ids:iface-id=sw0-port1
+check ovn-nbctl --wait=hv sync
+ovn-appctl debug/pause
+OVS_WAIT_UNTIL([test x$(as hv1 ovn-appctl -t ovn-controller debug/status) = "xpaused"])
+
+ovn-nbctl ls-add sw0 -- lsp-add sw0 sw0-port1 -- lsp-set-addresses sw0-port1 "50:54:00:00:00:01 192.168.0.2"
+ovn-nbctl lsp-del sw0-port1
+
+ovn-appctl debug/resume
+check ovn-nbctl --wait=hv sync
+
+ovn-nbctl ls-del sw0
+check ovn-nbctl --wait=hv sync
+OVN_CLEANUP([hv1])
+AT_CLEANUP
+])
+