@@ -9434,6 +9434,11 @@ ovn-nbctl lsp-add bar bar3 \
# Create two hypervisor and create OVS ports corresponding to logical ports.
net_add n1
+sim_add hv-foo
+as hv-foo
+ovs-vsctl add-br br-phys
+ovn_attach n1 br-phys 192.168.0.253
+
sim_add hv1
as hv1
ovs-vsctl add-br br-phys
@@ -9603,7 +9608,7 @@ as hv1 ovs-appctl netdev-dummy/receive vm1 $packet
OVN_CHECK_PACKETS([hv1/vm1-tx.pcap], [expected1])
# Test binding of parent and container ports.
-ovn-nbctl lsp-set-options vm1 requested-chassis=foo
+ovn-nbctl lsp-set-options vm1 requested-chassis=hv-foo
OVS_WAIT_UNTIL([test xdown = x$(ovn-nbctl lsp-get-up vm1)])
OVS_WAIT_UNTIL([test xdown = x$(ovn-nbctl lsp-get-up foo1)])
@@ -13454,6 +13459,10 @@ ovn-nbctl ls-add ls0
ovn-nbctl lsp-add ls0 lsp0
net_add n1
+sim_add hv-foo
+as hv-foo
+ovs-vsctl add-br br-phys
+ovn_attach n1 br-phys 192.168.0.10
sim_add hv1
as hv1
ovs-vsctl add-br br-phys
@@ -13473,7 +13482,7 @@ wait_column "$hv1_uuid" Port_Binding chassis logical_port=lsp0
AT_CHECK([as hv1 ovs-ofctl dump-flows br-int table=0 | grep in_port=1], [0], [ignore])
AT_CHECK([as hv1 ovs-ofctl dump-flows br-int table=65 | grep actions=output:1], [0], [ignore])
-check ovn-nbctl --wait=hv lsp-set-options lsp0 requested-chassis=non-existant-chassis
+check ovn-nbctl --wait=hv lsp-set-options lsp0 requested-chassis=hv-foo
OVS_WAIT_UNTIL([test 1 = $(grep -c "Releasing lport lsp0 from this chassis" hv1/ovn-controller.log)])
check ovn-nbctl --wait=hv sync
wait_column '' Port_Binding chasssi logical_port=lsp0
A couple of tests refers to non-existent chassis to validate that the ovn-controller would release ports that otherwise was destined for it when requested-chassis points somewhere else. With upcoming changes to have the ovn-controller use the new Port_Binding:requested_chassis column maintained by northd instead of processing the options itself, referring to a non-existant chassis will no longer work as the tests expect. With this patch we instead add a throw-away chassis to the simulation and point the requested-chassis option at that chassis. Signed-off-by: Frode Nordahl <frode.nordahl@canonical.com> --- tests/ovn.at | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-)