← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1916276] [NEW] IP address inventory handling for routed net does not work for ip_allocation=deferrred

 

Public bug reported:


Reproduction:
0) have a devstack on recent master and turn on the segments service_plugin in neutron.conf

1) create a provider net

  $ openstack network create net3 --share --provider-network-type vlan
--provider-physical-network physnet0 --provider-segment 103


2) get the segmentation id
 
  $ openstack network segment list --network net3
 
3) use the segmentation id to create a subnet

  $ openstack subnet create subnet3 --network net3 --subnet-range
10.0.7.0/24 --network-segment 8313239b-eddd-4a38-86d6-5c50ffee8b52


4) create a port with ip_allocation=deferred (default
  
  $ openstack port create --net net3 port1

At this point no IP is allocated for the port so the IP inventory is
placement expected to be the same as at #3)

5) bound the port like nova does

  $ openstack port set port1 --device-owner compute:nova --host aio

this assigns an IP address to the port.

Expected:
The IP inventory on the segment 8313239b-eddd-4a38-86d6-5c50ffee8b52 is updated

  $ openstack resource provider inventory list 8313239b-eddd-
4a38-86d6-5c50ffee8b52

Actual:
The IP inventory is not updated. 

Triage:
There seems to be logic error in [1]. It gets the segment_id of the original port (before the binding) but that code looks for the fixed_ips in the port founds nothing and therefore returns no segment_id. Then the code simply returns from [1]. However the new port (after the binding) has segment_id so there is a need for inventory recalculation.

See the reproduction with command printouts in [2]

[1]https://opendev.org/openstack/neutron/src/branch/master/neutron/services/segments/plugin.py#L446-L450
[2]http://paste.openstack.org/show/802844/

** Affects: neutron
     Importance: Undecided
         Status: New

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

Title:
  IP address inventory handling for routed net does not work for
  ip_allocation=deferrred

Status in neutron:
  New

Bug description:
  
  Reproduction:
  0) have a devstack on recent master and turn on the segments service_plugin in neutron.conf

  1) create a provider net

    $ openstack network create net3 --share --provider-network-type vlan
  --provider-physical-network physnet0 --provider-segment 103

  
  2) get the segmentation id
   
    $ openstack network segment list --network net3
   
  3) use the segmentation id to create a subnet

    $ openstack subnet create subnet3 --network net3 --subnet-range
  10.0.7.0/24 --network-segment 8313239b-eddd-4a38-86d6-5c50ffee8b52

  
  4) create a port with ip_allocation=deferred (default
    
    $ openstack port create --net net3 port1

  At this point no IP is allocated for the port so the IP inventory is
  placement expected to be the same as at #3)

  5) bound the port like nova does

    $ openstack port set port1 --device-owner compute:nova --host aio

  this assigns an IP address to the port.

  Expected:
  The IP inventory on the segment 8313239b-eddd-4a38-86d6-5c50ffee8b52 is updated

    $ openstack resource provider inventory list 8313239b-eddd-
  4a38-86d6-5c50ffee8b52

  Actual:
  The IP inventory is not updated. 

  Triage:
  There seems to be logic error in [1]. It gets the segment_id of the original port (before the binding) but that code looks for the fixed_ips in the port founds nothing and therefore returns no segment_id. Then the code simply returns from [1]. However the new port (after the binding) has segment_id so there is a need for inventory recalculation.

  See the reproduction with command printouts in [2]

  [1]https://opendev.org/openstack/neutron/src/branch/master/neutron/services/segments/plugin.py#L446-L450
  [2]http://paste.openstack.org/show/802844/

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