yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #01508
[Bug 1152958] Re: os-fixed-ips api does not take care deleted ip address
** Changed in: nova
Status: Fix Committed => Fix Released
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1152958
Title:
os-fixed-ips api does not take care deleted ip address
Status in OpenStack Compute (Nova):
Fix Released
Bug description:
1. Instance info:
lzy@host:~$ nova list
+--------------------------------------+------+--------+-----------------+
| ID | Name | Status | Networks |
+--------------------------------------+------+--------+-----------------+
| 3a312912-e342-4fdf-af96-5a35df41e706 | xxx | ACTIVE | private=9.9.0.3 |
+--------------------------------------+------+--------+-----------------+
2. fixed ip info query request:
curl -i "http://10.10.0.1:8774/v2/948a39350b1a4973a484844f4ccd5cb7/os-fixed-ips/9.9.0.3.x" -X GET -H "X-Auth-Project-Id: admin" -H "User-Agent: python-novaclient" -H "Accept: application/json" -H "X-Auth-Token: fedda46d59694bb8b25e4b93d13d6198"
3. HTTP response:
HTTP/1.1 404 Not Found
Content-Length: 79
Content-Type: application/json; charset=UTF-8
X-Compute-Request-Id: req-d0d3eaf3-22c3-41c2-ad20-5eaa5b7d3c65
Date: Sat, 09 Mar 2013 11:26:33 GMT
{"itemNotFound": {"message": "Fixed IP 9.9.0.3 has been deleted",
"code": 404}}
4. Deleted fixed ip address in db:
mysql> select * from fixed_ips where address = '9.9.0.3';
+---------------------+---------------------+---------------------+---------+----+---------+------------+-----------+--------+----------+----------------------+------+--------------------------------------+
| created_at | updated_at | deleted_at | deleted | id | address | network_id | allocated | leased | reserved | virtual_interface_id | host | instance_uuid |
+---------------------+---------------------+---------------------+---------+----+---------+------------+-----------+--------+----------+----------------------+------+--------------------------------------+
| 2012-11-27 08:45:43 | 2012-11-27 08:47:26 | 2012-11-27 09:37:43 | 1 | 4 | 9.9.0.3 | 1 | 0 | 0 | 0 | 1 | NULL | NULL |
| 2012-11-27 09:38:38 | 2013-03-05 01:32:47 | NULL | 0 | 36 | 9.9.0.3 | 2 | 1 | 1 | 0 | 10 | NULL | 3a312912-e342-4fdf-af96-5a35df41e706 |
+---------------------+---------------------+---------------------+---------+----+---------+------------+-----------+--------+----------+----------------------+------+--------------------------------------+
2 rows in set (0.00 sec)
5. Except fixed ip info result:
HTTP/1.1 200 OK
X-Compute-Request-Id: req-2b32430a-b0a7-4a6b-9076-76bc69311551
Content-Type: application/json
Content-Length: 113
Date: Sat, 09 Mar 2013 11:28:01 GMT
{"fixed_ip": {"cidr": "9.9.0.0/24", "hostname": "lzy", "host": "dev-
compute-ibm-folsom-1", "address": "9.9.0.3"}}
6. Analisys
The defect in os-fixed-ips api extension, it not take care the ips which marked 'deleted'.
To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1152958/+subscriptions