Skip to content

Commit

Permalink
Merge pull request #185 from fnordahl/fix-cms-openstack
Browse files Browse the repository at this point in the history
Fix a few issues found in the OpenStack CMS plugin
  • Loading branch information
dceara authored Oct 31, 2023
2 parents 3ed6f0d + d4c9078 commit 791c715
Showing 1 changed file with 7 additions and 11 deletions.
18 changes: 7 additions & 11 deletions ovn-tester/cms/openstack/openstack.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down Expand Up @@ -616,9 +612,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)

Expand All @@ -639,8 +635,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:
Expand Down

0 comments on commit 791c715

Please sign in to comment.