← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1247844] Re: PortLimit thrown when specifying used fixed ip

 

** Changed in: python-neutronclient
       Status: Fix Committed => Fix Released

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1247844

Title:
  PortLimit thrown when specifying used fixed ip

Status in OpenStack Compute (Nova):
  Fix Released
Status in Python client library for Neutron:
  Fix Released

Bug description:
  PortLimit thrown when specifying used fixed ip

  The nova/network/neutronv2/api.py _create_port will catch errors
  thrown from the neutron client.  The code asserts that a 409 error is
  an over-quota error.  However, this will hide other errors that may be
  occurring within the system.

  The code is currently taking a calculated risk by assuming that all
  409 errors that come through this code path will be over quota's.
  However, another high traffic code path is specifying a fixed_ip.  If
  a user specifies a fixed ip address, this code will now incorrectly
  throw a PortLimitExceeded error.  This leads the users to believe that
  they have run out of their quota limit.

  Example exception (then wrapped exception):

  NV-6FC38FD Neutron error creating port on network 7d360984-e12c-4bb3-819d-4b93c4ca4269
  Traceback (most recent call last):
    File "/usr/lib/python2.6/site-packages/nova/network/neutronv2/api.py", line 182, in _create_port
      port_id = port_client.create_port(port_req_body)['port']['id']
    File "/usr/lib/python2.6/site-packages/neutronclient/v2_0/client.py", line 108, in with_params
      ret = self.function(instance, *args, **kwargs)
    File "/usr/lib/python2.6/site-packages/neutronclient/v2_0/client.py", line 308, in create_port
      return self.post(self.ports_path, body=body)
    File "/usr/lib/python2.6/site-packages/neutronclient/v2_0/client.py", line 1188, in post
      headers=headers, params=params)
    File "/usr/lib/python2.6/site-packages/neutronclient/v2_0/client.py", line 1111, in do_request
      self._handle_fault_response(status_code, replybody)
    File "/usr/lib/python2.6/site-packages/neutronclient/v2_0/client.py", line 1081, in _handle_fault_response
      exception_handler_v20(status_code, des_error_body)
    File "/usr/lib/python2.6/site-packages/neutronclient/v2_0/client.py", line 93, in exception_handler_v20
      message=msg)
  NeutronClientException: 409-{u'NeutronError': {u'message': u'Unable to complete operation for network 7d360984-e12c-4bb3-819d-4b93c4ca4269. The IP address 10.0.0.2 is in use.', u'type': u'IpAddressInUse', u'detail': u''}}

  Traceback (most recent call last):
    File "/usr/lib/python2.6/site-packages/nova/compute/manager.py", line 1236, in _allocate_network_async
      dhcp_options=dhcp_options)
    File "/usr/lib/python2.6/site-packages/nova/network/api.py", line 49, in wrapper
      res = f(self, context, *args, **kwargs)
    File "/usr/lib/python2.6/site-packages/nova/network/neutronv2/api.py", line 358, in allocate_for_instance
      LOG.exception(msg, port_id)
    File "/usr/lib/python2.6/site-packages/nova/network/neutronv2/api.py", line 335, in allocate_for_instance
      security_group_ids, available_macs, dhcp_opts))
    File "/usr/lib/python2.6/site-packages/nova/network/neutronv2/api.py", line 191, in _create_port
      raise exception.PortLimitExceeded()
  PortLimitExceeded: Maximum number of ports exceeded

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