OSAPI: A server with DB state of 'shutdown' shows as 'ACTIVE'.
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Fix Released
|
Medium
|
Alex Meade |
Bug Description
Nova trunk 2011.2~gamma2~ (981):
Using the OSAPI a server with a DB state of 'shutdown' shows up as 'ACTIVE' in the API.
mysql> select id, state, state_description from instances;
+----+-
| id | state | state_description |
+----+-
| 1 | 5 | shutdown |
+----+-
root@nova1:~# nova list
+----+-
| ID | Name | Status | Public IP | Private IP |
+----+-
| 1 | Yo Dawg | ACTIVE | | 172.19.1.2 |
+----+-
root@nova1:~# euca-describe-
RESERVATION r-lo6v517h admin default
INSTANCE i-00000001 ami-00000003 172.19.1.2 172.19.1.2 shutdown None (admin, xen-compute) 0 m1.tiny 2011-04-
Related branches
- Jay Pipes (community): Approve
- Vish Ishaya (community): Approve
- Brian Waldon (community): Approve
-
Diff: 90 lines (+30/-4)3 files modifiedAuthors (+1/-0)
nova/api/openstack/views/servers.py (+2/-2)
nova/tests/api/openstack/test_servers.py (+27/-2)
Changed in nova: | |
assignee: | nobody → Titan (rackspace-titan) |
Changed in nova: | |
assignee: | Titan (rackspace-titan) → Alex Meade (alex-meade) |
Changed in nova: | |
status: | New → In Progress |
Changed in nova: | |
status: | In Progress → Fix Committed |
Changed in nova: | |
status: | Fix Committed → In Progress |
Changed in nova: | |
importance: | Undecided → Medium |
Changed in nova: | |
status: | In Progress → Fix Committed |
Changed in nova: | |
milestone: | none → diablo-1 |
Changed in nova: | |
milestone: | diablo-1 → 2011.3 |
status: | Fix Committed → Fix Released |
This has always been a difference in how the actual state of the vm reflected the difference in what is essentially a billing status. The vm is technically active and could be restarted as it is available for customer interaction.
If the status of 'shutdown' or 'rebooting' or any other possible action on a vm is to be reflected in the state should it be another field in the api? The vm could be in ACTIVE status and shutdown. That seems reasonable.