[ovs-dev] [PATCH ovn v2 6/9] tests: Amend release stale port binding test for RBAC

Frode Nordahl frode.nordahl at canonical.com
Fri Mar 5 12:16:28 UTC 2021

The current version of the test attempts to simulate chassis
registration prior to starting `ovn-controller`, however it does
not set the `hostname` field.

The RBAC role for `ovn-controller` does not allow for a chassis to
change its own name or hostname, which makes sense as this is used
for authentication.

Update the test to set the `hostname` field when simulating chassis
registration so that `ovn-controller` does not attempt to update it
and subsequently make the test fail.

Fixes b6b3823d4 ("ovn-controller: Fix I-P for SB Port_Binding and OVS Interface")

Signed-off-by: Frode Nordahl <frode.nordahl at canonical.com>
 tests/ovn.at | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/ovn.at b/tests/ovn.at
index bec593dcc..ca9623fee 100644
--- a/tests/ovn.at
+++ b/tests/ovn.at
@@ -21572,7 +21572,7 @@ ovn-nbctl --wait=sb lsp-add ls1 lsp1
 # Simulate the fact that lsp1 had been previously bound on hv1.
 ovn-sbctl --id=@e create encap chassis_name=hv1 ip="" type="geneve" \
-    -- --id=@c create chassis name=hv1 encaps=@e \
+    -- --id=@c create chassis hostname=hv1 name=hv1 encaps=@e \
     -- set Port_Binding lsp1 chassis=@c
 as hv1

More information about the dev mailing list