← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1952897] Re: Cannot setup IPv6 overlay network in xena

 

Reviewed:  https://review.opendev.org/c/openstack/neutron/+/820376
Committed: https://opendev.org/openstack/neutron/commit/a47e9494c1d8895425ad3a05a2c2290c74f0b647
Submitter: "Zuul (22348)"
Branch:    master

commit a47e9494c1d8895425ad3a05a2c2290c74f0b647
Author: Tamas Gergely Peter <tamasgp@xxxxxxxxxxxxx>
Date:   Tue Dec 28 16:00:36 2021 +0000

    Check whether vxlan group and local addresses are IPv4 or IPv6
    
    Check if group and/or local addresses passed to ip_lib / add_vxlan()
    are IPv4 or IPv6. In case of IPv4 fill 'vxlan_group' and 'vxlan_local'
    arguments and in case of IPv6 fill 'vxlan_group6' and 'vxlan_local6'
    arguments to be passed down to privileged create_interface() method.
    In case of an invalid address format raise an AddrFormatError exception.
    
    Closes-Bug: #1952897
    Change-Id: I2e3b0c1635627edb2c86c6120b0410ab3c4678b2


** Changed in: neutron
       Status: In Progress => Fix Released

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/1952897

Title:
  Cannot setup IPv6 overlay network in xena

Status in neutron:
  Fix Released

Bug description:
  After upgrading from pike to xena my IPv6 vxlan overlay networks with
  linuxbridge stopped working.

  In neutron-linuxbridge-agent.log on the compute nodes I see:
  Traceback (most recent call last):
    File "/usr/lib/python3/dist-packages/neutron/plugins/ml2/drivers/agent/_common_agent.py", line 465, in daemon_loop
     sync = self.process_network_devices(device_info)
    File "/usr/local/lib/python3.8/dist-packages/osprofiler/profiler.py", line 160, in wrapper
      result = f(*args, **kwargs)
    File "/usr/lib/python3/dist-packages/neutron/plugins/ml2/drivers/agent/_common_agent.py", line 214, in process_network_devices
      resync_a = self.treat_devices_added_updated(devices_added_updated)
    File "/usr/local/lib/python3.8/dist-packages/osprofiler/profiler.py", line 160, in wrapper
      result = f(*args, **kwargs)
    File "/usr/lib/python3/dist-packages/neutron/plugins/ml2/drivers/agent/_common_agent.py", line 231, in treat_devices_added_updated
      self._process_device_if_exists(device_details)
    File "/usr/lib/python3/dist-packages/neutron/plugins/ml2/drivers/agent/_common_agent.py", line 256, in _process_device_if_exists
      interface_plugged = self.mgr.plug_interface(
    File "/usr/lib/python3/dist-packages/neutron/plugins/ml2/drivers/linuxbridge/agent/linuxbridge_neutron_agent.py", line 582, in plug_interface
      return self.add_tap_interface(network_id, network_segment.network_type,
    File "/usr/lib/python3/dist-packages/neutron/plugins/ml2/drivers/linuxbridge/agent/linuxbridge_neutron_agent.py", line 521, in add_tap_interface
      return False
    File "/usr/local/lib/python3.8/dist-packages/oslo_utils/excutils.py", line 227, in __exit__
      self.force_reraise()
    File "/usr/local/lib/python3.8/dist-packages/oslo_utils/excutils.py", line 200, in force_reraise
      raise self.value
    File "/usr/lib/python3/dist-packages/neutron/plugins/ml2/drivers/linuxbridge/agent/linuxbridge_neutron_agent.py", line 511, in add_tap_interface
      return self._add_tap_interface(network_id, network_type,
    File "/usr/lib/python3/dist-packages/neutron/plugins/ml2/drivers/linuxbridge/agent/linuxbridge_neutron_agent.py", line 542, in _add_tap_interface
      elif not self.ensure_physical_in_bridge(network_id,
    File "/usr/lib/python3/dist-packages/neutron/plugins/ml2/drivers/linuxbridge/agent/linuxbridge_neutron_agent.py", line 485, in ensure_physical_in_bridge
      return self.ensure_vxlan_bridge(network_id, segmentation_id, mtu)
    File "/usr/lib/python3/dist-packages/neutron/plugins/ml2/drivers/linuxbridge/agent/linuxbridge_neutron_agent.py", line 260, in ensure_vxlan_bridge
      interface = self.ensure_vxlan(segmentation_id, mtu)
    File "/usr/lib/python3/dist-packages/neutron/plugins/ml2/drivers/linuxbridge/agent/linuxbridge_neutron_agent.py", line 356, in ensure_vxlan
      int_vxlan = self.ip.add_vxlan(interface, segmentation_id,
    File "/usr/lib/python3/dist-packages/neutron/agent/linux/ip_lib.py", line 303, in add_vxlan
      privileged.create_interface(name, self.namespace, "vxlan", **kwargs)
    File "/usr/local/lib/python3.8/dist-packages/oslo_privsep/priv_context.py", line 271, in _wrap
      return self.channel.remote_call(name, args, kwargs,
    File "/usr/local/lib/python3.8/dist-packages/oslo_privsep/daemon.py", line 216, in remote_call
      raise exc_type(*result[2])
  OSError: illegal IP address string passed to inet_pton

  
  After some debugging I've found that xena uses pyroute2 module to create interfaces and it tries to parse the IPv6 vxlan_group and vxlan_local addresses with AF_INET address family, despite that the ml2_conf.ini contains "overlay_ip_version = 6".

  If I apply the following modification to ip_lib.py, the issue
  disappears, however I know that this is just working until I use IPv6
  vxlan networks.

  --- ip_lib.py.orig      2021-11-30 16:12:31.434975862 +0000
  +++ ip_lib.py   2021-12-01 10:44:20.737971722 +0000
  @@ -280,7 +280,7 @@
                     local=None, srcport=None, dstport=None, proxy=False):
           kwargs = {'vxlan_id': vni}
           if group:
  -            kwargs['vxlan_group'] = group
  +            kwargs['vxlan_group6'] = group
           if dev:
               kwargs['physical_interface'] = dev
           if ttl:
  @@ -288,7 +288,7 @@
           if tos:
               kwargs['vxlan_tos'] = tos
           if local:
  -            kwargs['vxlan_local'] = local
  +            kwargs['vxlan_local6'] = local
           if proxy:
               kwargs['vxlan_proxy'] = proxy
           # tuple: min,max

  Is there any solution to use IPv6 overlay networks without issues?

To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/1952897/+subscriptions



References