Public bug reported:

Method "build_segment_queries_for_tenant_and_shared_ranges" returns two queries:
- One for those network segment ranges matching the project_id
- One for those network segment ranges shared (no project_id, but available for 
everyone)

The first one, if "project_id" is not present in the filter variable, returns 
an empty list:
https://github.com/openstack/neutron/blob/6a8277d70ee28ae6fcb68a75634eb508d4e6952a/neutron/plugins/ml2/drivers/helpers.py#L117


The returned queries are used in "allocate_partially_specified_segment": 
https://github.com/openstack/neutron/blob/6a8277d70ee28ae6fcb68a75634eb508d4e6952a/neutron/plugins/ml2/drivers/helpers.py#L197-L200


If the first object is not a query but an empty list, the code will fail.

** Affects: neutron
     Importance: Undecided
     Assignee: Rodolfo Alonso (rodolfo-alonso-hernandez)
         Status: New

** Changed in: neutron
     Assignee: (unassigned) => Rodolfo Alonso (rodolfo-alonso-hernandez)

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

Title:
  Method "build_segment_queries_for_tenant_and_shared_ranges" returning
  empty query

Status in neutron:
  New

Bug description:
  Method "build_segment_queries_for_tenant_and_shared_ranges" returns two 
queries:
  - One for those network segment ranges matching the project_id
  - One for those network segment ranges shared (no project_id, but available 
for everyone)

  The first one, if "project_id" is not present in the filter variable, returns 
an empty list:
  
https://github.com/openstack/neutron/blob/6a8277d70ee28ae6fcb68a75634eb508d4e6952a/neutron/plugins/ml2/drivers/helpers.py#L117

  
  The returned queries are used in "allocate_partially_specified_segment": 
https://github.com/openstack/neutron/blob/6a8277d70ee28ae6fcb68a75634eb508d4e6952a/neutron/plugins/ml2/drivers/helpers.py#L197-L200

  
  If the first object is not a query but an empty list, the code will fail.

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

-- 
Mailing list: https://launchpad.net/~yahoo-eng-team
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~yahoo-eng-team
More help   : https://help.launchpad.net/ListHelp

Reply via email to