← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1096797] Re: multiple IP allocations for one quantum port

 

[Expired for quantum because there has been no activity for 60 days.]

** Changed in: quantum
       Status: Incomplete => Expired

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

Title:
  multiple IP allocations for one quantum port

Status in OpenStack Quantum (virtual network service):
  Expired

Bug description:
  In db_base_plugin_v2.py:

  def _allocate_ips_for_port(self, context, network, port):
           ..............
           ..............
           ..............
           ..............
          else:
              filter = {'network_id': [p['network_id']]}
              subnets = self.get_subnets(context, filters=filter)
              # Split into v4 and v6 subnets
              v4 = []
              v6 = []
              for subnet in subnets:
                  if subnet['ip_version'] == 4:
                      v4.append(subnet)
                  else:
                      v6.append(subnet)
              version_subnets = [v4, v6]
              for subnets in version_subnets:
                  if subnets:
                      result = QuantumDbPluginV2._generate_ip(context, network,
                                                              subnets)
                      ips.append({'ip_address': result['ip_address'],
                                  'subnet_id': result['subnet_id']})
          return ips

  It looks like the intention was to allocate one IP address from each of the subnet that exist on the network to which this port belongs. But the above code only gives one IP address. 
  Shouldn't we loop on all v4 subnets also?

  thanks
  Asif

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