Can't add exact count of fixed ips to port (regression)

Bug #1623800 reported by Andrey Pavlov
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
High
Kevin Benton

Bug Description

environment: latest devstack. services: nova, glance, keystone, cinder, neutron, neutron-vpnaas, ec2-api
non-admin project.

we have a scenario when we create a port and then add two fixed ips to it.
Now neutron adds only one fixed_ip to this port but this Monday all was good.
And looks like that now it adds count-1 of passed new fixed_ips.

logs:

2016-09-15 09:13:47.568 14578 DEBUG keystoneclient.session [req-41aa5bf9-b166-4eb8-b415-cdf039598667 ef0282da2233468c8e715dbfd4385c80 c44a90bf24c14dcbac693c9bb8ac1923 - - -] REQ: curl -g -i --cacert "/opt/stack/data/ca-bundle.pem" -X GET http://10.10.0.4:9696/v2.0/ports/0be539d4-ed3c-4bba-8a25-9cb1641335ab.json -H "User-Agent: python-neutronclient" -H "Accept: application/json" -H "X-Auth-Token: {SHA1}87af409cdd3b0396fa6954bdc181fddac54d823d" _http_log_request /usr/local/lib/python2.7/dist-packages/keystoneclient/session.py:206
2016-09-15 09:13:47.627 14578 DEBUG keystoneclient.session [req-41aa5bf9-b166-4eb8-b415-cdf039598667 ef0282da2233468c8e715dbfd4385c80 c44a90bf24c14dcbac693c9bb8ac1923 - - -] RESP: [200] Content-Type: application/json Content-Length: 735 X-Openstack-Request-Id: req-4fcc4b7c-09d3-40b6-9332-a3974e422630 Date: Thu, 15 Sep 2016 06:13:47 GMT Connection: keep-alive
RESP BODY: {"port": {"status": "DOWN", "created_at": "2016-09-15T06:13:46", "project_id": "c44a90bf24c14dcbac693c9bb8ac1923", "description": "", "allowed_address_pairs": [], "admin_state_up": true, "network_id": "93e7bdae-bb7b-4e3e-b33d-e80a561014ea", "tenant_id": "c44a90bf24c14dcbac693c9bb8ac1923", "extra_dhcp_opts": [], "updated_at": "2016-09-15T06:13:46", "name": "eni-30152657", "device_owner": "", "revision_number": 5, "mac_address": "fa:16:3e:12:34:dd", "port_security_enabled": true, "binding:vnic_type": "normal", "fixed_ips": [{"subnet_id": "783bf3fa-a077-4a27-9fae-05a7e99fe19e", "ip_address": "10.7.0.12"}], "id": "0be539d4-ed3c-4bba-8a25-9cb1641335ab", "security_groups": ["2c51d398-1bd1-4084-8063-41bfe57788a4"], "device_id": ""}}
 _http_log_response /usr/local/lib/python2.7/dist-packages/keystoneclient/session.py:231
2016-09-15 09:13:47.628 14578 DEBUG neutronclient.v2_0.client [req-41aa5bf9-b166-4eb8-b415-cdf039598667 ef0282da2233468c8e715dbfd4385c80 c44a90bf24c14dcbac693c9bb8ac1923 - - -] GET call to neutron for http://10.10.0.4:9696/v2.0/ports/0be539d4-ed3c-4bba-8a25-9cb1641335ab.json used request id req-4fcc4b7c-09d3-40b6-9332-a3974e422630 _append_request_id /usr/local/lib/python2.7/dist-packages/neutronclient/v2_0/client.py:127

2016-09-15 09:13:47.628 14578 DEBUG keystoneclient.session [req-41aa5bf9-b166-4eb8-b415-cdf039598667 ef0282da2233468c8e715dbfd4385c80 c44a90bf24c14dcbac693c9bb8ac1923 - - -] REQ: curl -g -i --cacert "/opt/stack/data/ca-bundle.pem" -X PUT http://10.10.0.4:9696/v2.0/ports/0be539d4-ed3c-4bba-8a25-9cb1641335ab.json -H "User-Agent: python-neutronclient" -H "Content-Type: application/json" -H "Accept: application/json" -H "X-Auth-Token: {SHA1}87af409cdd3b0396fa6954bdc181fddac54d823d" -d '{"port": {"fixed_ips": [{"subnet_id": "783bf3fa-a077-4a27-9fae-05a7e99fe19e", "ip_address": "10.7.0.12"}, {"subnet_id": "783bf3fa-a077-4a27-9fae-05a7e99fe19e"}, {"subnet_id": "783bf3fa-a077-4a27-9fae-05a7e99fe19e"}]}}' _http_log_request /usr/local/lib/python2.7/dist-packages/keystoneclient/session.py:206
2016-09-15 09:13:48.014 14578 DEBUG keystoneclient.session [req-41aa5bf9-b166-4eb8-b415-cdf039598667 ef0282da2233468c8e715dbfd4385c80 c44a90bf24c14dcbac693c9bb8ac1923 - - -] RESP: [200] Content-Type: application/json Content-Length: 816 X-Openstack-Request-Id: req-0c86f7d1-ce47-4c9e-b842-1aa37c2ca024 Date: Thu, 15 Sep 2016 06:13:48 GMT Connection: keep-alive
RESP BODY: {"port": {"status": "DOWN", "created_at": "2016-09-15T06:13:46", "project_id": "c44a90bf24c14dcbac693c9bb8ac1923", "description": "", "allowed_address_pairs": [], "admin_state_up": true, "network_id": "93e7bdae-bb7b-4e3e-b33d-e80a561014ea", "tenant_id": "c44a90bf24c14dcbac693c9bb8ac1923", "extra_dhcp_opts": [], "updated_at": "2016-09-15T06:13:47", "name": "eni-30152657", "device_owner": "", "revision_number": 6, "mac_address": "fa:16:3e:12:34:dd", "port_security_enabled": true, "binding:vnic_type": "normal", "fixed_ips": [{"subnet_id": "783bf3fa-a077-4a27-9fae-05a7e99fe19e", "ip_address": "10.7.0.12"}, {"subnet_id": "783bf3fa-a077-4a27-9fae-05a7e99fe19e", "ip_address": "10.7.0.9"}], "id": "0be539d4-ed3c-4bba-8a25-9cb1641335ab", "security_groups": ["2c51d398-1bd1-4084-8063-41bfe57788a4"], "device_id": ""}}
 _http_log_response /usr/local/lib/python2.7/dist-packages/keystoneclient/session.py:231
2016-09-15 09:13:48.015 14578 DEBUG neutronclient.v2_0.client [req-41aa5bf9-b166-4eb8-b415-cdf039598667 ef0282da2233468c8e715dbfd4385c80 c44a90bf24c14dcbac693c9bb8ac1923 - - -] PUT call to neutron for http://10.10.0.4:9696/v2.0/ports/0be539d4-ed3c-4bba-8a25-9cb1641335ab.json used request id req-0c86f7d1-ce47-4c9e-b842-1aa37c2ca024 _append_request_id /usr/local/lib/python2.7/dist-packages/neutronclient/v2_0/client.py:127

Tags: l3-ipam-dhcp
Revision history for this message
Andrey Pavlov (apavlov-e) wrote :

Reverting of https://review.openstack.org/#/c/369051/ can fix the problem.

Changed in neutron:
status: New → Confirmed
importance: Undecided → High
milestone: none → newton-rc1
assignee: nobody → Kevin Benton (kevinbenton)
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/370801

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

Related fix proposed to branch: master
Review: https://review.openstack.org/370802

tags: added: l3-ipam-dhcp
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (master)

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

commit 748faa0579056c0157d038e539610f386dd64abe
Author: Kevin Benton <email address hidden>
Date: Wed Sep 14 20:37:56 2016 -0700

    Revert "Don't allocate IP on port update when existing subnet specified"

    This reverts commit f07c07b16fb0858c45f6cef135a8d8c07a16c505.
    This broke the ability to add fixed IPs to a port based on
    subnet_id.

    API test to prevent regression in child patch.

    Change-Id: Ia13abea59431744ce7a0270f480f4bf61a7161e0
    Closes-Bug: #1623800

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

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

commit 7c6071bbbc32014f6663c12c70a5ed5358fe870f
Author: Kevin Benton <email address hidden>
Date: Wed Sep 14 20:36:44 2016 -0700

    Add API test to ensure IPs can be added by subnet

    A user should be able to request additional fixed IPs
    from the same subnet they already have an IP from.
    This prevents a regression from that behavior.

    Related-Bug: #1623800
    Change-Id: I1867963e027f8d240580ada89b540443f74ed684

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.