From 5466797cb36dafd36e9993314c74b7bc029c60bd Mon Sep 17 00:00:00 2001 From: Frode Nordahl Date: Tue, 31 Oct 2023 11:13:05 +0100 Subject: [PATCH 1/3] cms/openstack: Fix router lsp options. The current code produces options like: 'options:exclude-lb-vips-from-garp=true,' 'options:nat-addresses=router,' 'options:router-port=lrp-NNN' Signed-off-by: Frode Nordahl --- ovn-tester/cms/openstack/openstack.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ovn-tester/cms/openstack/openstack.py b/ovn-tester/cms/openstack/openstack.py index 84a8bb5e..a3264bc2 100644 --- a/ovn-tester/cms/openstack/openstack.py +++ b/ovn-tester/cms/openstack/openstack.py @@ -616,9 +616,9 @@ def _add_router_port( if is_gw: lsp_options = ( - "exclude-lb-vips-from-garp=true, " - "nat-addresses=router, " - f"router-port={router_port_name}" + "exclude-lb-vips-from-garp=true " + "nat-addresses=router " + f"router-port={router_port_name} " ) self.nbctl.ls_port_set_set_options(ls_port, lsp_options) From f1312a12e4e324edcfafa2ee819a24edb46dc2c1 Mon Sep 17 00:00:00 2001 From: Frode Nordahl Date: Tue, 31 Oct 2023 13:56:31 +0100 Subject: [PATCH 2/3] cms/openstack: Fix port group reference in acls. The current code refer to a portgroup named $pg_pg... which is not correct. Signed-off-by: Frode Nordahl --- ovn-tester/cms/openstack/openstack.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ovn-tester/cms/openstack/openstack.py b/ovn-tester/cms/openstack/openstack.py index a3264bc2..002cb995 100644 --- a/ovn-tester/cms/openstack/openstack.py +++ b/ovn-tester/cms/openstack/openstack.py @@ -639,8 +639,8 @@ def _create_default_security_group(self) -> PortGroup: f"inport == @{pg_name} && ip6", ] out_rules = [ - f"outport == @{pg_name} && ip4 && ip4.src == $pg_{pg_name}_ip4", - f"outport == @{pg_name} && ip6 && ip6.src == $pg_{pg_name}_ip6", + f"outport == @{pg_name} && ip4 && ip4.src == ${pg_name}_ip4", + f"outport == @{pg_name} && ip6 && ip6.src == ${pg_name}_ip6", ] for rule in in_rules: From d4c907818c5d43ce37578076942474fa805281af Mon Sep 17 00:00:00 2001 From: Frode Nordahl Date: Tue, 31 Oct 2023 14:57:46 +0100 Subject: [PATCH 3/3] cms/openstack: Set route policy to '""' instead of not setting it. Having the transaction error in the run makes the run fail on larger scale. Signed-off-by: Frode Nordahl --- ovn-tester/cms/openstack/openstack.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/ovn-tester/cms/openstack/openstack.py b/ovn-tester/cms/openstack/openstack.py index 002cb995..9fe2c821 100644 --- a/ovn-tester/cms/openstack/openstack.py +++ b/ovn-tester/cms/openstack/openstack.py @@ -246,12 +246,8 @@ def connect_external_network_to_project( self.external_port = lr_port gw_net = DualStackSubnet(netaddr.IPNetwork("0.0.0.0/0")) - # XXX: ovsdbapp does not allow setting external IDs to static route - # XXX: Setting 'policy' to "" throws "constraint violation" error in - # logs because ovsdbapp does not allow not specifying policy. - # However, the route itself is created successfully with no - # policy, the same way Neutron does it. - self.nbctl.route_add(project.router, gw_net, lr_port.ip, "") + # NOTE(mkalcok): Neutron actually sets policy to '""' + self.nbctl.route_add(project.router, gw_net, lr_port.ip, '""') gw_nodes = self._get_gateway_chassis(external_network.num_gw_nodes) for index, chassis in enumerate(gw_nodes):