This only would be an issue with extremely large numbers of ports,
marking as Opinion.

** Changed in: nova
       Status: New => Opinion

** Changed in: nova
   Importance: Undecided => Wishlist

-- 
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/1659169

Title:
  Nested loop breaking out doesn't handle correctly

Status in OpenStack Compute (nova):
  Opinion

Bug description:
  
https://github.com/openstack/nova/blob/master/nova/network/neutronv2/api.py#L1674-L1681

  for p in ports:
      for ip in p['fixed_ips']:
          if ip['ip_address'] == address:
              port_id = p['id']
              break

  in the above nested loops, when we find the port_id, it just break one
  for loop, the outside loop will continue, it's a bit waste, should
  handle this gracefully.

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

-- 
Mailing list: https://launchpad.net/~yahoo-eng-team
Post to     : yahoo-eng-team@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yahoo-eng-team
More help   : https://help.launchpad.net/ListHelp

Reply via email to