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

Bug #1916276 reported by Balazs Gibizer
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
In Progress
Medium
Unassigned

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/

Changed in neutron:
status: New → Confirmed
importance: Undecided → Medium
Revision history for this message
Balazs Gibizer (balazs-gibizer) wrote :

I think the tempest test[1] just reproduced the problem reported above.

[1] https://review.opendev.org/c/openstack/tempest/+/665155

Changed in neutron:
assignee: nobody → Lajos Katona (lajos-katona)
Revision history for this message
Lajos Katona (lajos-katona) wrote :
Revision history for this message
Slawek Kaplonski (slaweq) wrote : auto-abandon-script

This bug has had a related patch abandoned and has been automatically un-assigned due to inactivity. Please re-assign yourself if you are continuing work or adjust the state as appropriate if it is no longer valid.

Changed in neutron:
assignee: Lajos Katona (lajos-katona) → nobody
tags: added: timeout-abandon
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on neutron (master)

Change abandoned by "Slawek Kaplonski <email address hidden>" on branch: master
Review: https://review.opendev.org/c/openstack/neutron/+/777443
Reason: This review is > 4 weeks without comment, and failed Zuul jobs the last time it was checked. We are abandoning this for now. Feel free to reactivate the review by pressing the restore button and leaving a 'recheck' comment to get fresh test results.

Changed in neutron:
status: Confirmed → In Progress
Revision history for this message
Slawek Kaplonski (slaweq) wrote : auto-abandon-script

This bug has had a related patch abandoned and has been automatically un-assigned due to inactivity. Please re-assign yourself if you are continuing work or adjust the state as appropriate if it is no longer valid.

Changed in neutron:
status: In Progress → New
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on neutron (master)

Change abandoned by "Slawek Kaplonski <email address hidden>" on branch: master
Review: https://review.opendev.org/c/openstack/neutron/+/777443
Reason: This review is > 4 weeks without comment, and failed Zuul jobs the last time it was checked. We are abandoning this for now. Feel free to reactivate the review by pressing the restore button and leaving a 'recheck' comment to get fresh test results.

Changed in neutron:
status: New → In Progress
Revision history for this message
Slawek Kaplonski (slaweq) wrote : auto-abandon-script

This bug has had a related patch abandoned and has been automatically un-assigned due to inactivity. Please re-assign yourself if you are continuing work or adjust the state as appropriate if it is no longer valid.

Changed in neutron:
status: In Progress → New
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on neutron (master)

Change abandoned by "Slawek Kaplonski <email address hidden>" on branch: master
Review: https://review.opendev.org/c/openstack/neutron/+/777443
Reason: This review is > 4 weeks without comment, and failed Zuul jobs the last time it was checked. We are abandoning this for now. Feel free to reactivate the review by pressing the restore button and leaving a 'recheck' comment to get fresh test results.

Changed in neutron:
status: New → In Progress
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.