Bug 2050239 - ovn-octavia loadbalancer not working when VIP is on a dual-stack provider network
Summary: ovn-octavia loadbalancer not working when VIP is on a dual-stack provider net...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: python-ovn-octavia-provider
Version: 17.0 (Wallaby)
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ga
: 17.0
Assignee: Luis Tomas Bolivar
QA Contact: Bruna Bonguardo
URL:
Whiteboard:
Depends On:
Blocks: 2056567 2056569
TreeView+ depends on / blocked
 
Reported: 2022-02-03 14:18 UTC by Luis Tomas Bolivar
Modified: 2022-09-21 12:19 UTC (History)
4 users (show)

Fixed In Version: python-ovn-octavia-provider-1.0.1-0.20220223150349.dea57c8.el9ost
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 2056567 (view as bug list)
Environment:
Last Closed: 2022-09-21 12:18:58 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Launchpad 1959903 0 None None None 2022-02-03 14:18:21 UTC
OpenStack gerrit 827670 0 None MERGED Allow to create ovn loadbalancer on dual-stack provider networks 2022-02-15 14:02:51 UTC
OpenStack gerrit 829440 0 None MERGED Allow to create ovn loadbalancer on dual-stack provider networks 2022-02-21 13:49:44 UTC
Red Hat Issue Tracker OSP-12459 0 None None None 2022-02-03 14:33:02 UTC
Red Hat Product Errata RHEA-2022:6543 0 None None None 2022-09-21 12:19:23 UTC

Description Luis Tomas Bolivar 2022-02-03 14:18:21 UTC
If an octavia loadbalancer is created with OVN provider, on a provider network which has dual-stack (ipv4 and ipv6 subnets), the next error happens:

2022-02-03 09:19:04.234 12 ERROR ovn_octavia_provider.helper [-] Exception occurred during creation of loadbalancer: ValueError: IPAddress() does not support netmasks or subnet prefixes! See documentation for details.
2022-02-03 09:19:04.234 12 ERROR ovn_octavia_provider.helper Traceback (most recent call last):
2022-02-03 09:19:04.234 12 ERROR ovn_octavia_provider.helper File "/usr/lib/python3.6/site-packages/netaddr/ip/__init__.py", line 803, in parse_ip_network
2022-02-03 09:19:04.234 12 ERROR ovn_octavia_provider.helper prefixlen = int(val2)
2022-02-03 09:19:04.234 12 ERROR ovn_octavia_provider.helper ValueError: invalid literal for int() with base 10: '24 2001:db8::f816:3eff:fed5:a9e1/64'
2022-02-03 09:19:04.234 12 ERROR ovn_octavia_provider.helper
2022-02-03 09:19:04.234 12 ERROR ovn_octavia_provider.helper During handling of the above exception, another exception occurred:
2022-02-03 09:19:04.234 12 ERROR ovn_octavia_provider.helper
2022-02-03 09:19:04.234 12 ERROR ovn_octavia_provider.helper Traceback (most recent call last):
2022-02-03 09:19:04.234 12 ERROR ovn_octavia_provider.helper File "/usr/lib/python3.6/site-packages/ovn_octavia_provider/helper.py", line 873, in lb_create
2022-02-03 09:19:04.234 12 ERROR ovn_octavia_provider.helper ovn_lr = self._find_lr_of_ls(ovn_ls, subnet.get('gateway_ip'))
2022-02-03 09:19:04.234 12 ERROR ovn_octavia_provider.helper File "/usr/lib/python3.6/site-packages/ovn_octavia_provider/helper.py", line 640, in _find_lr_of_ls
2022-02-03 09:19:04.234 12 ERROR ovn_octavia_provider.helper port.external_ids['neutron:cidrs']).ip
2022-02-03 09:19:04.234 12 ERROR ovn_octavia_provider.helper File "/usr/lib/python3.6/site-packages/netaddr/ip/__init__.py", line 928, in __init__
2022-02-03 09:19:04.234 12 ERROR ovn_octavia_provider.helper implicit_prefix, flags)
2022-02-03 09:19:04.234 12 ERROR ovn_octavia_provider.helper File "/usr/lib/python3.6/site-packages/netaddr/ip/__init__.py", line 810, in parse_ip_network
2022-02-03 09:19:04.234 12 ERROR ovn_octavia_provider.helper mask = IPAddress(val2, module.version, flags=INET_PTON)
2022-02-03 09:19:04.234 12 ERROR ovn_octavia_provider.helper File "/usr/lib/python3.6/site-packages/netaddr/ip/__init__.py", line 280, in __init__
2022-02-03 09:19:04.234 12 ERROR ovn_octavia_provider.helper % self.__class__.__name__)
2022-02-03 09:19:04.234 12 ERROR ovn_octavia_provider.helper ValueError: IPAddress() does not support netmasks or subnet prefixes! See documentation for details.
2022-02-03 09:19:04.234 12 ERROR ovn_octavia_provider.helper
2022-02-03 09:19:04.942 12 WARNING ovn_octavia_provider.helper [-] Deleting the VIP port 7b6bc45c-ff51-45e3-81ef-7b596528ff44 since LB went into ERROR state

This is due to logical ports associated to the provider network logical switch have both ipv4 and ipv6 into the "neutron:cidrs" field at external_ids:
ovn-nbctl list logical_switch_port 0016d6d0-b8cb-4542-b6fe-840740eef9f0
_uuid : 0016d6d0-b8cb-4542-b6fe-840740eef9f0
addresses : [router]
dhcpv4_options : []
dhcpv6_options : []
dynamic_addresses : []
enabled : true
external_ids : {"neutron:cidrs"="172.24.100.198/24 2001:db8::f816:3eff:fed5:a9e1/64", "neutron:device_id"="142845e4-3424-4b19-a02a-6bfed63efb8f", "neutron:device_owner"="network:router_gateway", "neutron:network_name"=neutron-b1f7e9be-2c18-4f68-9253-ca2bcbb904a1, "neutron:port_name"="", "neutron:project_id"="", "neutron:revision_number"="5", "neutron:security_group_ids"="", "neutron_bgpvpn:as"="64999", "neutron_bgpvpn:vni"="1001"}
ha_chassis_group : []
name : "6b7aa199-b715-4585-a88b-30f276961995"
options : {nat-addresses=router, router-port=lrp-6b7aa199-b715-4585-a88b-30f276961995}
parent_name : []
port_security : []
tag : []
tag_request : []
type : router
up : true

Comment 12 errata-xmlrpc 2022-09-21 12:18:58 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Release of components for Red Hat OpenStack Platform 17.0 (Wallaby)), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHEA-2022:6543


Note You need to log in before you can comment on or make changes to this bug.