Comment 1 for bug 1228804

Revision history for this message
ChangBo Guo(gcb) (glongwave) wrote : Re: Need add precheck compute service before stop/start instance

This can be reproduced as follow steps:

1)nova show gcb_test_222
+--------------------------------------+----------------------------------------------------------+
| Property | Value |
+--------------------------------------+----------------------------------------------------------+
| status | ACTIVE |
| updated | 2013-09-21T03:45:52Z |
| OS-EXT-STS:task_state | None |
| OS-EXT-SRV-ATTR:host | kvm-installer-222 |
| key_name | None |
| image | cirros-Image (c2fdf54f-4978-4ee9-af0e-d1e0d5db2631) |
| hostId | b605c007b2a5de389a65a645d88d708b82745b4706361d9ef18bf410 |
| OS-EXT-STS:vm_state | active |
| OS-EXT-SRV-ATTR:instance_name | instance-00000038 |
| OS-SRV-USG:launched_at | 2013-09-20T22:45:53.555626 |
| OS-EXT-SRV-ATTR:hypervisor_hostname | kvm-installer-222 |
| flavor | m1.tiny (1) |
| id | 7677f07e-f5f4-42ee-a5d1-f1dbcddab769 |
| security_groups | [{u'name': u'default'}] |
| OS-SRV-USG:terminated_at | None |
| user_id | d02e0752613142da90387adcc7cf2664 |
| name | gcb_test_222 |
| created | 2013-09-21T03:45:49Z |
| tenant_id | 6db20e01ef6f42f18cbebb56f70ebed3 |
| OS-DCF:diskConfig | MANUAL |
| metadata | {} |
| os-extended-volumes:volumes_attached | [] |
| accessIPv4 | |
| accessIPv6 | |
| net1 network | 10.0.2.7 |
| progress | 0 |
| OS-EXT-STS:power_state | 1 |
| OS-EXT-AZ:availability_zone | nova |
| config_drive | |
+--------------------------------------+----------------------------------------------------------+
2)nova availability-zone-list
+---------------------------------+----------------------------------------+
| Name | Status |
+---------------------------------+----------------------------------------+
| internal | available |
| |- vapp-0823-kvm-controller-226 | |
| | |- nova-cert | enabled :-) 2013-09-21T03:49:11.078833 |
| | |- nova-conductor | enabled :-) 2013-09-21T03:49:10.851063 |
| | |- nova-consoleauth | enabled :-) 2013-09-21T03:49:10.693941 |
| | |- nova-scheduler | enabled :-) 2013-09-21T03:49:10.844385 |
| | |- nova-console | enabled :-) 2013-09-21T03:49:11.431072 |
| | |- nova-cells | enabled :-) 2013-09-21T03:49:11.945337 |
| nova | available |
| |- kvm-installer-221 | |
| | |- nova-compute | enabled :-) 2013-09-21T03:49:08.087701 |
| |- kvm-installer-222 | |
| | |- nova-compute | enabled XXX 2013-09-21T03:47:32.943466 |
+---------------------------------+----------------------------------------+
3)nova stop gcb_test_222
4)nova show gcb_test_222
+--------------------------------------+----------------------------------------------------------+
| Property | Value |
+--------------------------------------+----------------------------------------------------------+
| status | ACTIVE |
| updated | 2013-09-21T03:51:10Z |
| OS-EXT-STS:task_state | powering-off |
| OS-EXT-SRV-ATTR:host | kvm-installer-222 |
| key_name | None |
| image | cirros-Image (c2fdf54f-4978-4ee9-af0e-d1e0d5db2631) |
| hostId | b605c007b2a5de389a65a645d88d708b82745b4706361d9ef18bf410 |
| OS-EXT-STS:vm_state | active |
| OS-EXT-SRV-ATTR:instance_name | instance-00000038 |
| OS-SRV-USG:launched_at | 2013-09-20T22:45:53.555626 |
| OS-EXT-SRV-ATTR:hypervisor_hostname | kvm-installer-222 |
| flavor | m1.tiny (1) |
| id | 7677f07e-f5f4-42ee-a5d1-f1dbcddab769 |
| security_groups | [{u'name': u'default'}] |
| OS-SRV-USG:terminated_at | None |
| user_id | d02e0752613142da90387adcc7cf2664 |
| name | gcb_test_222 |
| created | 2013-09-21T03:45:49Z |
| tenant_id | 6db20e01ef6f42f18cbebb56f70ebed3 |
| OS-DCF:diskConfig | MANUAL |
| metadata | {} |
| os-extended-volumes:volumes_attached | [] |
| accessIPv4 | |
| accessIPv6 | |
| net1 network | 10.0.2.7 |
| progress | 0 |
| OS-EXT-STS:power_state | 1 |
| OS-EXT-AZ:availability_zone | nova |
| config_drive | |
+--------------------------------------+----------------------------------------------------------+
5)nova stop gcb_test_222
ERROR: Instance 7677f07e-f5f4-42ee-a5d1-f1dbcddab769 in task_state powering-off. Cannot stop while the instance is in this state.
(HTTP 400) (Request-ID: req-a51eb10b-c034-4ff0-afa5-3e996b812b75)