Resetting the Instance state once it’s in a stuck state
$ nova list
+--------------------------------------+----------------+---------+------------------------------------------. -------------+-------------+----------------------------------+
| ID | Name | Status | Task State | Power State | Networks |
+--------------------------------------+----------------+---------+------------------------------------------- -------------+-------------+----------------------------------+
| ca9496e9-0bd2-4734-9cf9-eb4e264628f7 | www | SHUTOFF | powering-on | Shutdown | fsf-lan=10.0.3.18, 93.20.168.177 |
+--------------------------------------+----------------+---------+----------------------------------------------------------+-------------+----------------------------------+
Setting the fields for the instance directly in the database will allow operations on the instance (nova start or nova volume-detach for instance):
$ mysql -e "update instances set task_state = NULL, \
vm_state = 'stopped', \
power_state = 4 \
where deleted = 0 and hostname = 'www' and \
uuid = 'ca9496e9-0bd2-4734-9cf9-eb4e264628f7'" nova
$ nova list
+--------------------------------------+----------------+---------+------------------------------------------. -------------+-------------+----------------------------------+
| ID | Name | Status | Task State | Power State | Networks |
+--------------------------------------+----------------+---------+------------------------------------------- -------------+-------------+----------------------------------+
| ca9496e9-0bd2-4734-9cf9-eb4e264628f7 | www | SHUTOFF | powering-on | Shutdown | fsf-lan=10.0.3.18, 93.20.168.177 |
+--------------------------------------+----------------+---------+----------------------------------------------------------+-------------+----------------------------------+
Setting the fields for the instance directly in the database will allow operations on the instance (nova start or nova volume-detach for instance):
$ mysql -e "update instances set task_state = NULL, \
vm_state = 'stopped', \
power_state = 4 \
where deleted = 0 and hostname = 'www' and \
uuid = 'ca9496e9-0bd2-4734-9cf9-eb4e264628f7'" nova
No comments:
Post a Comment