nova flavor-delete fails with InstanceTypeNotFoundByName API error
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Fix Released
|
Medium
|
Vish Ishaya |
Bug Description
Problem Description:
When attempting "nova flavor-delete" sometimes an API error occurs, where it seems that the ID passed as a nova CLI argument is mapped to the wrong flavor name, resulting in a "could not be found" 404 error, even though the selected ID is present in the "nova flavor-list" output:
```
[root@heatlt heat]# nova flavor-list
+----+-
| ID | Name | Memory_MB | Disk | Ephemeral | Swap | VCPUs | RXTX_Factor |
+----+-
| 1 | t1.micro | 256 | 0 | 10 | | 1 | 1.0 |
| 8 | m2.2xlarge | 2048 | 0 | 10 | | 2 | 1.0 |
| 9 | m2.4xlarge | 2048 | 0 | 10 | | 2 | 1.0 |
+----+-
[root@heatlt heat]# nova --debug flavor-delete 1
connect: (127.0.0.1, 5000)
send: 'POST /v2.0/tokens HTTP/1.1\r\nHost: 127.0.0.
reply: 'HTTP/1.1 200 OK\r\n'
header: Content-Type: application/json
header: Vary: X-Auth-Token
header: Date: Mon, 10 Sep 2012 14:15:08 GMT
header: Transfer-Encoding: chunked
connect: (localhost, 8774)
send: u'DELETE /v1.1/fd7795f68
reply: 'HTTP/1.1 404 Not Found\r\n'
header: Content-Length: 78
header: Content-Type: application/json; charset=UTF-8
header: X-Compute-
header: Date: Mon, 10 Sep 2012 14:15:09 GMT
DEBUG (shell:416) The resource could not be found. (HTTP 404)
Traceback (most recent call last):
File "/usr/lib/
OpenStackCo
File "/usr/lib/
args.
File "/usr/lib/
cs.
File "/usr/lib/
self.
File "/usr/lib/
resp, body = self.api.
File "/usr/lib/
return self._cs_
File "/usr/lib/
**kwargs)
File "/usr/lib/
raise exceptions.
NotFound: The resource could not be found. (HTTP 404)
ERROR: The resource could not be found. (HTTP 404)
```
There is a backtrace in the nova API log, which seems to suggest the ID (t1.micro) is being mapped to the wrong name ( m1.tiny), full backtrace attached.
```
2012-09-10 15:15:09 TRACE nova.api.openstack File "/usr/lib/
2012-09-10 15:15:09 TRACE nova.api.openstack instance_
2012-09-10 15:15:09 TRACE nova.api.openstack File "/usr/lib/
2012-09-10 15:15:09 TRACE nova.api.openstack raise exception.
2012-09-10 15:15:09 TRACE nova.api.openstack InstanceTypeNot
2012-09-10 15:15:09 TRACE nova.api.openstack
2012-09-10 15:15:09 INFO nova.api.openstack [req-ece516fa-
```
Test environment : Fedora 17, package versions as follows:
$ rpm -qa | grep nova
openstack-
python-
openstack-
openstack-
python-
openstack-
openstack-
openstack-
openstack-
openstack-
openstack-
openstack-
Reproducer:
Running the heat-api "tools/
This script deletes all current flavors, and creates a predefined set of flavors. It will work once, then on the second run it nearly always errors on one flavor-delete. Copy of this script is attached below.
Changed in nova: | |
importance: | Undecided → Medium |
status: | New → In Progress |
assignee: | nobody → Vish Ishaya (vishvananda) |
milestone: | none → folsom-rc1 |
Changed in nova: | |
status: | Fix Committed → Fix Released |
Changed in nova: | |
milestone: | folsom-rc1 → 2012.2 |
Script repoducer (from https://github.com/heat-api/heat tools)
Run this multiple times and the error described above occurs.