"Requested operation is not valid: domain is not running" (REBUILD)
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Triaged
|
Medium
|
Unassigned |
Bug Description
I'm not sure if I can do these steps in practice, but I could perform the following steps in the system, and I got the an error.
DevStack branch=
1. ./unstack.sh && ./clean.sh && ./stack.sh
2. source openrc admin admin
3. openstack flavor create --ram 21 --disk 0 --vcpus 1 custom
4. openstack server create --flavor custom --image cirros-
5. openstack server show test
+------
| Field | Value |
+------
| OS-DCF:diskConfig | MANUAL |
| OS-EXT-
| OS-EXT-
| OS-EXT-
| OS-EXT-
| OS-EXT-
| OS-EXT-
| OS-EXT-STS:vm_state | active |
| OS-SRV-
| OS-SRV-
| accessIPv4 | |
| accessIPv6 | |
| addresses | public=2001:db8::d, 192.168.1.228 |
| config_drive | |
| created | 2019-01-
| flavor | custom (ac9f385c-
| hostId | d99cb6d42c02400
| id | e7825018-
| image | cirros-
| key_name | None |
| name | test |
| progress | 0 |
| project_id | 6a0880f1c0b946a
| properties | |
| security_groups | name='default' |
| status | ACTIVE |
| updated | 2019-01-
| user_id | 7c9be80e945f433
| volumes_attached | |
+------
6. openstack server rebuild test
7. openstack server list
+------
| ID | Name | Status | Networks | Image | Flavor |
+------
| e7825018-
+------
Logs:
Jan 24 21:15:03 wallacec-ubuntu nova-compute[
Jan 24 21:15:03 wallacec-ubuntu nova-compute[
Jan 24 21:15:03 wallacec-ubuntu nova-compute[
Jan 24 21:15:03 wallacec-ubuntu nova-compute[
Jan 24 21:15:03 wallacec-ubuntu nova-compute[
Jan 24 21:15:03 wallacec-ubuntu nova-compute[
Jan 24 21:15:03 wallacec-ubuntu nova-compute[
Jan 24 21:15:03 wallacec-ubuntu nova-compute[
Jan 24 21:15:03 wallacec-ubuntu nova-compute[
Jan 24 21:15:03 wallacec-ubuntu nova-compute[
Jan 24 21:15:03 wallacec-ubuntu nova-compute[
Jan 24 21:15:03 wallacec-ubuntu nova-compute[
Jan 24 21:15:04 wallacec-ubuntu dstat.sh[10952]: 24-01 21:15:04| 18 2 78 1 0 0|7065M 29.0M 604M 184M| 0 0 | 0 520k| 0 34.0 |2664 6736 |2.15 2.03 1.96|3.0 0 0| 0 0 |cinder-volume 132574.8% 0 0 |dstat 10953 88k 375B0.5%|java 687M|3571M 244M| 33 361 1 64 1
Jan 24 21:15:05 wallacec-ubuntu neutron-
Jan 24 21:15:05 wallacec-ubuntu neutron-
Jan 24 21:15:05 wallacec-ubuntu neutron-
Jan 24 21:15:05 wallacec-ubuntu dstat.sh[10952]: 24-01 21:15:05| 16 6 78 0 0 0|7065M 29.1M 606M 183M| 536B 0 |4096B 152k|1.00 9.00 |2738 6627 |2.15 2.03 1.96|2.0 0 2.0| 0 0 |cinder-volume 132575.2% 0 0 |dstat 10953 88k 379B0.2%|java 687M|3571M 244M| 33 361 1 64 1
Jan 24 21:15:06 wallacec-ubuntu dstat.sh[10952]: 24-01 21:15:06| 19 3 78 0 0 0|7065M 29.1M 606M 182M| 731B 338B|4096B 48k|1.00 6.00 |2674 6177 |2.15 2.03 1.96|4.0 1.0 0|4096B 0 |cinder-volume 132576.2% 0 0 |dstat 10953 86k 381B0.8%|java 687M|3571M 244M| 33 361 1 55 1
Jan 24 21:15:07 wallacec-ubuntu neutron-
Jan 24 21:15:07 wallacec-ubuntu neutron-
Jan 24 21:15:07 wallacec-ubuntu neutron-
tags: | added: libvirt |
I think you instance did not reached the active power state before you hit rebuild.
If I create and instance then pause it and then I try to rebuild it then I nova api rejectes the operation with HTTP 409:
Cannot 'rebuild' instance 6b6d6775- 064a-455a- 9c69-a57b5e67c7 7b while it is in vm_state paused (HTTP 409) (Request-ID: req-aa9b8256- 999e-4038- afd2-70291e5833 26
The difference is that in your case the vm_state is active and the power_state is paused while in my case the vm_state is paused too.
Nova only checks for the vm_state in the compute/api [1] but it seems in the rebuild case we need to check for the power state as well.
[1]https:/ /github. com/openstack/ nova/blob/ a628d2f09a42a0f aa5fcb36793e230 4de634638e/ nova/compute/ api.py# L3151