← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1364166] Re: Netaddr can't check IPv6 subnets for overlap

 

** Changed in: neutron
       Status: Fix Committed => 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/1364166

Title:
  Netaddr can't check IPv6 subnets for overlap

Status in OpenStack Neutron (virtual network service):
  Fix Released

Bug description:
  Because of bug of netaddr: https://github.com/drkjam/netaddr/issues/69
  netaddr can not check overlapping of IPv6 subnets:
  https://github.com/openstack/neutron/blob/master/neutron/db/db_base_plugin_v2.py#L572

  Netaddr of version higher than 0.7.12 should be used.

  Traceback:

  DEBUG neutron.api.v2.base [req-98c7e546-5dfa-488e-bf99-ac8c6d11b45e None] Request body: {u'subnet': {u'ip_version': 6, u'network_id': u'49a71376-b484-481f-a1ee-e2f3c3daca67', u'cidr': u'2003::/64', u'gateway_ip': u'2003::1'}} prepare_request_body /opt/stack/new/neutron/neutron/api/v2/base.py:578
   598 ERROR neutron.api.v2.resource [req-98c7e546-5dfa-488e-bf99-ac8c6d11b45e None] create failed
  Traceback (most recent call last):
    File "/opt/stack/new/neutron/neutron/api/v2/resource.py", line 87, in resource
      result = method(request=request, **args)
    File "/opt/stack/new/neutron/neutron/api/v2/base.py", line 448, in create
      obj = obj_creator(request.context, **kwargs)
    File "/opt/stack/new/neutron/neutron/plugins/ml2/plugin.py", line 660, in create_subnet
      result = super(Ml2Plugin, self).create_subnet(context, subnet)
    File "/opt/stack/new/neutron/neutron/db/db_base_plugin_v2.py", line 1054, in create_subnet
      self._validate_subnet_cidr(context, network, s['cidr'])
    File "/opt/stack/new/neutron/neutron/db/db_base_plugin_v2.py", line 572, in _validate_subnet_cidr
      if (netaddr.IPSet([subnet.cidr]) & new_subnet_ipset):
    File "/usr/lib/python2.7/dist-packages/netaddr/ip/sets.py", line 520, in __len__
      "IP addresses! Use the .size property instead." % _sys_maxint)
  IndexError: range contains greater than 9223372036854775807 (maxint) IP addresses! Use the .size property instead.
   598 TRACE neutron.api.v2.resource
   598 INFO neutron.wsgi [req-98c7e546-5dfa-488e-bf99-ac8c6d11b45e None] 127.0.0.1 - - [01/Sep/2014 12:56:01] "POST /v2.0/subnets HTTP/1.1" 500 378 0.080822
   (598) accepted ('127.0.0.1', 59222)

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


References