a port which is not able to delete is made when floatingip create fails.

Bug #1064748 reported by Itsuro Oda on 2012-10-09
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Undecided
Nachi Ueno
Folsom
Medium
Gary Kotton
quantum (Ubuntu)
Undecided
Unassigned
Precise
Undecided
Unassigned
Quantal
Undecided
Unassigned

Bug Description

for example:
---
$ quantum port-show port-test
+----------------+---------------------------------------------------------------------------------+
| Field | Value |
+----------------+---------------------------------------------------------------------------------+
| admin_state_up | True |
| device_id | |
| device_owner | |
| fixed_ips | {"subnet_id": "77d8c9df-71a5-4159-953c-4cd4c06e9824", "ip_address": "10.0.1.4"} |
| id | 42bed62d-4bed-4e52-9922-949b05b2d9e5 |
| mac_address | fa:16:3e:af:ad:9e |
| name | port-test |
| network_id | e0d11816-4153-430a-abcc-46b8c7a68e99 |
| status | ACTIVE |
| tenant_id | be3fc4694da2413c833574d6e018d338 |
+----------------+---------------------------------------------------------------------------------+
$ quantum -v floatingip-create --port-id 42bed62d-4bed-4e52-9922-949b05b2d9e5 --fixed-ip-address "10.10.10.10" net-ext
DEBUG: quantumclient.quantum.v2_0.floatingip.CreateFloatingIP get_data(Namespace(columns=[], fixed_ip_address='10.10.10.10', floating_network_id='net-ext', formatter='table', port_id='42bed62d-4bed-4e52-9922-949b05b2d9e5', prefix='', request_format='json', tenant_id=None, value_specs=[], variables=[]))
DEBUG: quantumclient.client REQ: curl -i http://172.17.190.3:5000/v2.0/tokens -X POST -H "Content-Type: application/json" -H "Accept: application/json" -H "User-Agent: python-quantumclient"

DEBUG: quantumclient.client REQ BODY: {"auth": {"tenantName": "admin", "passwordCredentials": {"username": "admin", "password": "oda"}}}

DEBUG: quantumclient.client RESP:{'date': 'Tue, 09 Oct 2012 22:58:59 GMT', 'vary': 'X-Auth-Token', 'content-length': '2727', 'status': '200', 'content-type': 'application/json'}

DEBUG: quantumclient.client RESP BODY:{"access": {"token": {"expires": "2012-10-10T22:58:59Z", "id": "54f644616d6b4f56a0915437d326fa50", "tenant": {"enabled": true, "description": null, "name": "admin", "id": "be3fc4694da2413c833574d6e018d338"}}, "serviceCatalog": [{"endpoints": [{"adminURL": "http://172.17.190.3:8774/v2/be3fc4694da2413c833574d6e018d338", "region": "RegionOne", "publicURL": "http://172.17.190.3:8774/v2/be3fc4694da2413c833574d6e018d338", "internalURL": "http://172.17.190.3:8774/v2/be3fc4694da2413c833574d6e018d338"}], "endpoints_links": [], "type": "compute", "name": "Compute Service"}, {"endpoints": [{"adminURL": "http://172.17.190.3:9696/", "region": "RegionOne", "publicURL": "http://172.17.190.3:9696/", "internalURL": "http://172.17.190.3:9696/"}], "endpoints_links": [], "type": "network", "name": "Quantum Service"}, {"endpoints": [{"adminURL": "http://172.17.190.3:3333", "region": "RegionOne", "publicURL": "http://172.17.190.3:3333", "internalURL": "http://172.17.190.3:3333"}], "endpoints_links": [], "type": "s3", "name": "S3 Service"}, {"endpoints": [{"adminURL": "http://172.17.190.3:9292", "region": "RegionOne", "publicURL": "http://172.17.190.3:9292", "internalURL": "http://172.17.190.3:9292"}], "endpoints_links": [], "type": "image", "name": "Image Service"}, {"endpoints": [{"adminURL": "http://172.17.190.3:8776/v1/be3fc4694da2413c833574d6e018d338", "region": "RegionOne", "publicURL": "http://172.17.190.3:8776/v1/be3fc4694da2413c833574d6e018d338", "internalURL": "http://172.17.190.3:8776/v1/be3fc4694da2413c833574d6e018d338"}], "endpoints_links": [], "type": "volume", "name": "Volume Service"}, {"endpoints": [{"adminURL": "http://172.17.190.3:8773/services/Admin", "region": "RegionOne", "publicURL": "http://172.17.190.3:8773/services/Cloud", "internalURL": "http://172.17.190.3:8773/services/Cloud"}], "endpoints_links": [], "type": "ec2", "name": "EC2 Service"}, {"endpoints": [{"adminURL": "http://172.17.190.3:8000/v1", "region": "RegionOne", "publicURL": "http://172.17.190.3:8000/v1", "internalURL": "http://172.17.190.3:8000/v1"}], "endpoints_links": [], "type": "orchestration", "name": "Heat Service"}, {"endpoints": [{"adminURL": "http://172.17.190.3:35357/v2.0", "region": "RegionOne", "publicURL": "http://172.17.190.3:5000/v2.0", "internalURL": "http://172.17.190.3:5000/v2.0"}], "endpoints_links": [], "type": "identity", "name": "Identity Service"}], "user": {"username": "admin", "roles_links": [], "id": "af4f007f3197436dad5e6e6df0a75003", "roles": [{"name": "KeystoneServiceAdmin"}, {"name": "admin"}, {"name": "KeystoneAdmin"}], "name": "admin"}, "metadata": {"is_admin": 0, "roles": ["0351c121ed544e79a32c599f84ee898c", "61a36e1107e84ddc941317a6cedaae66", "7988289d6b0740259640c39a47c0d7c5"]}}}

DEBUG: quantumclient.client REQ: curl -i http://172.17.190.3:9696/v2.0/networks.json?fields=id&name=net-ext -X GET -H "User-Agent: python-quantumclient" -H "Content-Type: application/json" -H "Accept: application/json" -H "X-Auth-Token: 54f644616d6b4f56a0915437d326fa50"

DEBUG: quantumclient.client RESP:{'date': 'Tue, 09 Oct 2012 22:58:59 GMT', 'status': '200', 'content-length': '62', 'content-type': 'application/json', 'content-location': u'http://172.17.190.3:9696/v2.0/networks.json?fields=id&name=net-ext'}

DEBUG: quantumclient.client RESP BODY:{"networks": [{"id": "364db7e1-6343-497b-bc9b-0c6ec72fce3f"}]}

DEBUG: quantumclient.client REQ: curl -i http://172.17.190.3:9696/v2.0/floatingips.json -X POST -H "User-Agent: python-quantumclient" -H "Content-Type: application/json" -H "Accept: application/json" -H "X-Auth-Token: 54f644616d6b4f56a0915437d326fa50"

DEBUG: quantumclient.client REQ BODY: {"floatingip": {"floating_network_id": "364db7e1-6343-497b-bc9b-0c6ec72fce3f", "fixed_ip_address": "10.10.10.10", "port_id": "42bed62d-4bed-4e52-9922-949b05b2d9e5"}}

DEBUG: quantumclient.client RESP:{'date': 'Tue, 09 Oct 2012 22:58:59 GMT', 'status': '400', 'content-length': '120', 'content-type': 'application/json'}

DEBUG: quantumclient.client RESP BODY:{"QuantumError": "Bad floatingip request: Port 42bed62d-4bed-4e52-9922-949b05b2d9e5 does not have fixed ip 10.10.10.10"}

DEBUG: quantumclient.v2_0.client Error message: {"QuantumError": "Bad floatingip request: Port 42bed62d-4bed-4e52-9922-949b05b2d9e5 does not have fixed ip 10.10.10.10"}
ERROR: cliff.app Bad floatingip request: Port 42bed62d-4bed-4e52-9922-949b05b2d9e5 does not have fixed ip 10.10.10.10
DEBUG: quantumclient.shell clean_up CreateFloatingIP
DEBUG: quantumclient.shell got an error: Bad floatingip request: Port 42bed62d-4bed-4e52-9922-949b05b2d9e5 does not have fixed ip 10.10.10.10
$ quantum floatingip-list
+--------------------------------------+------------------+---------------------+--------------------------------------+
| id | fixed_ip_address | floating_ip_address | port_id |
+--------------------------------------+------------------+---------------------+--------------------------------------+
| 55f47dc1-61bd-4774-afb8-8585a2dc883c | 10.0.3.3 | 192.168.0.204 | e290d2c9-9f51-463c-9d14-993f842955db |
| 5d260348-1790-4a52-acad-0864c473027a | 10.0.1.3 | 192.168.0.202 | 6e001fee-89de-462c-b882-449523fc37dd |
| 699c172a-7ffb-419a-a82b-efeeda878fe9 | 10.0.2.3 | 192.168.0.203 | 0593e82a-be00-4692-a42e-5b95a297a688 |
+--------------------------------------+------------------+---------------------+--------------------------------------+
$ quantum port-show c12f2096-07b3-4ad9-87d8-4f9f342ac3d1
+----------------+--------------------------------------------------------------------------------------+
| Field | Value |
+----------------+--------------------------------------------------------------------------------------+
| admin_state_up | True |
| device_id | 9be4d38c-4c65-46e5-a847-683f18635948 |
| device_owner | network:floatingip |
| fixed_ips | {"subnet_id": "9454a527-5e59-4e36-8bb2-ee188b24fb85", "ip_address": "192.168.0.205"} |
| id | c12f2096-07b3-4ad9-87d8-4f9f342ac3d1 |
| mac_address | fa:16:3e:9e:be:b3 |
| name | |
| network_id | 364db7e1-6343-497b-bc9b-0c6ec72fce3f |
| status | ACTIVE |
| tenant_id | |
+----------------+--------------------------------------------------------------------------------------+
$ quantum port-delete c12f2096-07b3-4ad9-87d8-4f9f342ac3d1
Port c12f2096-07b3-4ad9-87d8-4f9f342ac3d1 has owner network:floatingip and therefore cannot be deleted directly via the port API.
---

Port creation and FloatingIP creation are diffrent transaction in the current code. (quantum/db/l3_db.py create_floatingip())
I think it should be done in the one transaction.

Nachi Ueno (nati-ueno) on 2012-10-25
Changed in quantum:
assignee: nobody → Nachi Ueno (nati-ueno)

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

Changed in quantum:
status: New → In Progress
Nachi Ueno (nati-ueno) on 2012-10-25
tags: added: folsom-backport-potential

Reviewed: https://review.openstack.org/14855
Committed: http://github.com/openstack/quantum/commit/33b45e7dd43d4a94ef3a20a96c157e3b14616cc2
Submitter: Jenkins
Branch: master

commit 33b45e7dd43d4a94ef3a20a96c157e3b14616cc2
Author: Nachi Ueno <email address hidden>
Date: Thu Oct 25 21:14:48 2012 +0000

    Make create_floatingip support transaction

    Fixes bug #1064748
    Also added unit test

    Change-Id: I82b2031af0a87a92ace9a8b86f89772beaca5e8f

Changed in quantum:
status: In Progress → Fix Committed

Reviewed: https://review.openstack.org/15192
Committed: http://github.com/openstack/quantum/commit/7c8a55ce9f4d5e1caa32cc7e14f53ce638686241
Submitter: Jenkins
Branch: stable/folsom

commit 7c8a55ce9f4d5e1caa32cc7e14f53ce638686241
Author: Nachi Ueno <email address hidden>
Date: Thu Oct 25 21:14:48 2012 +0000

    Make create_floatingip support transaction

    Fixes bug #1064748
    Also added unit test

    Change-Id: I82b2031af0a87a92ace9a8b86f89772beaca5e8f

tags: added: in-stable-folsom
Gary Kotton (garyk) on 2012-11-04
tags: removed: folsom-backport-potential
Chuck Short (zulcss) on 2012-11-06
Changed in quantum (Ubuntu):
status: New → Fix Released
Changed in quantum (Ubuntu Precise):
status: New → Confirmed
Thierry Carrez (ttx) on 2012-11-21
Changed in quantum:
milestone: none → grizzly-1
status: Fix Committed → Fix Released
Changed in quantum (Ubuntu Quantal):
status: New → Confirmed

Hello Itsuro, or anyone else affected,

Accepted quantum into quantal-proposed. The package will build now and be available at http://launchpad.net/ubuntu/+source/quantum/2012.2.1-0ubuntu1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in quantum (Ubuntu Quantal):
status: Confirmed → Fix Committed
tags: added: verification-needed
Mark McLoughlin (markmc) on 2013-01-22
tags: removed: in-stable-folsom
Launchpad Janitor (janitor) wrote :
Download full text (3.8 KiB)

This bug was fixed in the package quantum - 2012.2.1-0ubuntu1

---------------
quantum (2012.2.1-0ubuntu1) quantal-proposed; urgency=low

  * Resynchronize with stable/folsom (1e774867) (LP: #1085255):
    - [aeabb42] There are routing problems when the dnsmasq port does not come
      first in the routing table (LP: #1083238)
    - [04aab72] Quantum linux bridge not optimized with libvirt (LP: #1078210)
    - [ca7fc10] getting quotas from database has severe performance implications
      (LP: #1075369)
    - [66605e8] failed to update an external network into non external network
      (LP: #1083387)
    - [c60051a] Quantum test suite leaks memory like a sieve (LP: #1065276)
    - [3179dfc] clear_db() does incomplete db teardown (LP: #1080988)
    - [c1e19d7] Unauthorized command: cat /proc/None/cmdline (LP: #1077651)
    - [af9e076] At times a instance will not receive an IP address from the DHCP
      agent (LP: #1081664)
    - [e0d1a7d] allow multiple floating-ip on single port if they use different
      fixed ips and/or external nets (LP: #1057844)
    - [8471d79] Delete port fails to gateway ip (LP: #1079980)
    - [aca8b4a] fixed_ip allocation which is not included within
      allocation_pools makes error when delete port or re-create port
      (LP: #1077292)
    - [eacc9d3] Mapping same bridge to different phyiscal networks succeed
      (LP: #1067669)
    - [51b4c82] python-quantum: not region aware (LP: #1080793)
    - [6f0a486] delete floatingip should be in one transaction to delete port
      (LP: #1080516)
    - [db6cda7] Remove qpid configuration variables no longer supported
    - [a112840] Allow NVP plugin to use per-tenant quota extension
    - [82b1a55] Quantum service does not restart after reboot (LP: #1073999)
    - [c01a839] There are some cases that L3 API with an invalid parameter
      returns 500. (LP: #1064765)
    - [26b383f] external network can be plugged also as internal network for one
      router (LP: #1053633)
    - [49f649c] There is a lot of cases that API with an invalid parameter
      returns 500. (LP: #1062046)
    - [4546a18] When create subnet, you con set up the value as cidr (the value
      isn't cidr form). (LP: #1067959)
    - [9ba453a] killfilter should handle updated/deleted executables
      (LP: #1073768)
    - [7c8a55c] a port which is not able to delete is made when floatingip
      create fails. (LP: #1064748)
    - [c9b84cf] Linux bridge port update causes exception (LP: #1072713)
    - [cb57932] I can't add interface to router, if there is another port in
      non-shared network of other tenant (LP: #1057558)
    - [574e278] Ryu plugin does not support Security Groups (LP: #1059393)
    - [607f486] tap device added to integration bridge without tag
      (LP: #1064070)
    - [21a0fdf] L3 agent external network flag (LP: #1056720)
    - [5cbaff4] router create with external_gateway_info fails with 500 always.
      (LP: #1064235)
    - [63b81f6] l3 db operations failed in multiple transactions (LP: #1070335)
    - [bff17fb] Ensure that the SqlSoup import is still supported.
    - [e091a29] l3_nat_agent was renamed to l3_agent
    - [9030969] remove default value of 'local_ip' of 10...

Read more...

Changed in quantum (Ubuntu Quantal):
status: Fix Committed → Fix Released
Thierry Carrez (ttx) on 2013-04-04
Changed in quantum:
milestone: grizzly-1 → 2013.1
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers