After setting the iface-id, immediately check the up status of the port
binding, it will occasionally fail, especially when the port binding
status is reported later.

When it fails, the following will be output:
Checking values in sb Port_Binding with logical_port=lsp1 against false... 
found false
ovs-vsctl add-port br-int lsp1 -- set Interface lsp1 external-ids:iface-id=lsp1
./ovn-macros.at:307: "$@"
Checking values in sb Port_Binding with logical_port=lsp1 against true... found 
false
_uuid               : 15ebabb6-3dbb-4806-aa85-d1c03e3b39f6
logical_port        : lsp1
up                  : true
./ovn-macros.at:393: hard failure

Fixes: 4d3cb42b076b ("binding: Set Logical_Switch_Port.up when all OVS flows 
are installed.")
Signed-off-by: Gongming Chen <[email protected]>
---
 tests/ovn.at | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/ovn.at b/tests/ovn.at
index 80c9fe138..43dc16dd8 100644
--- a/tests/ovn.at
+++ b/tests/ovn.at
@@ -23885,7 +23885,7 @@ check ovn-nbctl --wait=hv sync
 check_column "false" Port_Binding up logical_port=lsp1
 
 check ovs-vsctl add-port br-int lsp1 -- set Interface lsp1 
external-ids:iface-id=lsp1
-check_column "true" Port_Binding up logical_port=lsp1
+wait_column "true" Port_Binding up logical_port=lsp1
 wait_column "true" nb:Logical_Switch_Port up name=lsp1
 OVS_WAIT_UNTIL([test `ovs-vsctl get Interface lsp1 external_ids:ovn-installed` 
= '"true"'])
 
-- 
2.23.0

_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to