Reset power state of instances

asked 2018-01-05 00:31:09 -0500

Wajahat gravatar image

updated 2018-01-05 00:35:00 -0500

I was trying out concurrent live-migrations of instances in openstack, and the VMs got stuck in migrating state so I did a service restart of nova-compute and libvirt-bin on the compute node they were running on. So then they went into NOSTATE as below:

Jasim9@ctl:~/vnf-rehoming$ nova list
+--------------------------------------+------------+--------+------------+-------------+----------------------------------------------------------------+
| ID                                   | Name       | Status | Task State | Power State | Networks                                                       |
+--------------------------------------+------------+--------+------------+-------------+----------------------------------------------------------------+
| f4046097-1132-4bf9-96b1-75fa6716de95 | Firewall   | ACTIVE | -          | NOSTATE     | mnic-2=10.10.2.2; mnic-3=10.10.3.3; flat-lan-1-net=10.11.10.12 |
| 1a2b194c-f43f-46d2-a32c-e50a286bb465 | Firewall_2 | ACTIVE | -          | NOSTATE     | mnic-2=10.10.2.4; mnic-3=10.10.3.4; flat-lan-1-net=10.11.10.14 |
| 048438ba-8e56-4fc4-adfb-37fdb5bd0849 | Firewall_3 | ACTIVE | -          | NOSTATE     | mnic-2=10.10.2.5; mnic-3=10.10.3.5; flat-lan-1-net=10.11.10.15 |
| c01a7da6-9a1f-4255-91a0-c7e034e1dc48 | Firewall_4 | ACTIVE | -          | NOSTATE     | mnic-2=10.10.2.6; mnic-3=10.10.3.6; flat-lan-1-net=10.11.10.16 |
| f4efc768-711d-4c7d-b539-1a641228c51c | Firewall_5 | ACTIVE | -          | NOSTATE     | mnic-2=10.10.2.7; mnic-3=10.10.3.7; flat-lan-1-net=10.11.10.17 |
| 13c5eeac-e180-4af7-bc79-117e638c2ea9 | Router2    | ACTIVE | -          | Running     | mnic-1=10.10.1.2; mnic-2=10.10.2.3; flat-lan-1-net=10.11.10.13 |
| 5f0702ab-cb61-4235-bd82-475becc55e66 | vClient    | ACTIVE | -          | Running     | mnic-1=10.10.1.3; flat-lan-1-net=10.11.10.10                   |
| 3ed2e93d-1e8f-40be-8dbf-7a1a7b3cdd32 | vServer    | ACTIVE | -          | Running     | mnic-3=10.10.3.2; flat-lan-1-net=10.11.10.11

tried reset-state --active and some other commands but cannot seem to get it to work. The VMs are actually running and I can ssh and everything. I just cannot run any nova commands on these as it gives error:

ERROR (Conflict): Cannot 'os-migrateLive' instance f4046097-1132-4bf9-96b1-75fa6716de95 while it is in power_state 0 (HTTP 409)

Update: Stopping and starting instances does solve the problem apparently, but I would prefer a way where I do not have to disrupt the instances (shutdown).

edit retag flag offensive close merge delete