fixed ip gets assigned when a port is created with no fixed ip

Bug #1617409 reported by Sridhar Venkat
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Invalid
Undecided
Manikantha Srinivas Tadi
neutron
Fix Released
High
Carl Baldwin

Bug Description

When a neutron port is created with no fixed ip, and bound to a nova instance, a random IP is automatically picked up from subnet pool and assigned.
Port request body :
port_req_body
{'port': {'network_id': u'b3bfb646-5794-44e6-86eb-0f90b18c6d78', 'tenant_id': u'ccfdd1bc5f894ad0a085e3e1d53f9329', 'mac_address': u'fa:f8:86:36:34:20', 'fixed_ips': [], 'admin_state_up': True}}

After it is bound to a nova instance, it gets an ip associated with it. From neutron port-show :
| fixed_ips | {"subnet_id": "90f2afbc-bc64-4a0c-823a-a39d71f1fadd", "ip_address": "10.0.0.5"} |
This appears to be a problem due to changes in newton. This behavior was not there in mitaka.

Changed in nova:
assignee: nobody → Manikantha Srinivas Tadi (manikantha-tadi)
Revision history for this message
Matt Riedemann (mriedem) wrote :

This is most likely not something that Nova is doing, but rather something Neutron is doing when the port is created, based on the type of neutron setup you have.

Changed in nova:
status: New → Invalid
Revision history for this message
Matt Riedemann (mriedem) wrote :
Revision history for this message
Carl Baldwin (carl-baldwin) wrote :

This is probably a bug. My intention was only to assign fixed_ips on port update if the port was a deferred IP port to begin with (only if fixed_ips is not explicitly passed on port create and the network is a routed network and so IPAM could not be done on create). However, for this to work correctly, we might need this [1] change and possibly a small bug fix.

I'll try to confirm this on Monday. I'll target this for rc-1 just to get it on the radar.

[1] https://review.openstack.org/#/c/361455/

Changed in neutron:
assignee: nobody → Carl Baldwin (carl-baldwin)
milestone: none → newton-rc1
John Schwarz (jschwarz)
Changed in neutron:
importance: Undecided → Medium
Changed in neutron:
status: New → Confirmed
importance: Medium → High
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (master)

Fix proposed to branch: master
Review: https://review.openstack.org/369062

Changed in neutron:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (master)

Reviewed: https://review.openstack.org/369062
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=ab4ee76c8bdacb0f272328e0b4efefc3b820e5ba
Submitter: Jenkins
Branch: master

commit ab4ee76c8bdacb0f272328e0b4efefc3b820e5ba
Author: Carl Baldwin <email address hidden>
Date: Mon Sep 12 16:09:50 2016 -0600

    Only do deferred ip allocation on deferred ports

    Only do deferred ip allocation on ports that were originally marked as
    deferred IP ports on port create.

    Change-Id: Ia34bc2617f99cca73f58c9e615a8ba78e667c9b3
    Closes-Bug: #1617409

Changed in neutron:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/neutron 9.0.0.0rc1

This issue was fixed in the openstack/neutron 9.0.0.0rc1 release candidate.

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.