migrate from stopped goes back to ACTIVE state after resize-confirm
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Fix Released
|
High
|
Matt Riedemann |
Bug Description
On havana master, running with this setup:
[root@ngp02-hv1 ~]# nova host-list
+------
| host_name | service | zone |
+------
| CN10 | compute | nova |
| cn12 | compute | nova |
| cn4 | compute | nova |
| cn6 | compute | nova |
| cn8 | compute | nova |
| ngp02-hv1.
| ngp02-hv1.
| ngp02-hv1.
| ngp02-hv1.
| ngp02-hv1.
| ngp02-hv1.
| ngp02-hv1.
+------
The compute nodes are all running the hyper-v driver.
1. Boot an instance to CN10:
nova boot --image quantal-
2. Then stop it:
[root@ngp02-hv1 testscripts]# nova stop Ivt_July2_9
[root@ngp02-hv1 testscripts]# nova show Ivt_July2_9
+------
| Property | Value |
+------
| status | SHUTOFF |
| updated | 2013-07-
| OS-EXT-
| OS-EXT-
| key_name | None |
| image | quantal-
| network1 network | 10.0.1.49 |
| hostId | 114d3be3249df7d
| OS-EXT-STS:vm_state | stopped |
| OS-EXT-
| OS-SRV-
| OS-EXT-
| flavor | m1.small (2) |
| id | 6c9a28c8-
| security_groups | [{u'name': u'default'}] |
| OS-SRV-
| user_id | b25a17a8fcfa440
| name | Ivt_July2_9 |
| created | 2013-07-
| tenant_id | 066c47e2d09b440
| OS-DCF:diskConfig | MANUAL |
| metadata | {} |
| accessIPv4 | |
| accessIPv6 | |
| OS-EXT-
| OS-EXT-
| config_drive | 1 |
+------
3. Then migrate it (moves from CN10 to cn4):
[root@ngp02-hv1 testscripts]# nova migrate Ivt_July2_9
[root@ngp02-hv1 testscripts]# nova show Ivt_July2_9
[root@ngp02-hv1 testscripts]# nova show Ivt_July2_9
+------
| Property | Value |
+------
| status | VERIFY_RESIZE |
| updated | 2013-07-
| OS-EXT-
| OS-EXT-
| key_name | None |
| image | quantal-
| network1 network | 10.0.1.49 |
| hostId | aec601f205a7665
| OS-EXT-STS:vm_state | resized |
| OS-EXT-
| OS-SRV-
| OS-EXT-
| flavor | m1.small (2) |
| id | 6c9a28c8-
| security_groups | [{u'name': u'default'}] |
| OS-SRV-
| user_id | b25a17a8fcfa440
| name | Ivt_July2_9 |
| created | 2013-07-
| tenant_id | 066c47e2d09b440
| OS-DCF:diskConfig | MANUAL |
| metadata | {} |
| accessIPv4 | |
| accessIPv6 | |
| progress | 0 |
| OS-EXT-
| OS-EXT-
| config_drive | 1 |
+------
4. Then confirm the migration. This is where the problem happens - the vm_state goes to ACTIVE even though the power_state is 4 (SHUTOFF):
[root@ngp02-hv1 testscripts]# nova show Ivt_July2_9
+------
| Property | Value |
+------
| status | ACTIVE |
| updated | 2013-07-
| OS-EXT-
| OS-EXT-
| key_name | None |
| image | quantal-
| network1 network | 10.0.1.49 |
| hostId | aec601f205a7665
| OS-EXT-STS:vm_state | active |
| OS-EXT-
| OS-SRV-
| OS-EXT-
| flavor | m1.small (2) |
| id | 6c9a28c8-
| security_groups | [{u'name': u'default'}] |
| OS-SRV-
| user_id | b25a17a8fcfa440
| name | Ivt_July2_9 |
| created | 2013-07-
| tenant_id | 066c47e2d09b440
| OS-DCF:diskConfig | MANUAL |
| metadata | {} |
| accessIPv4 | |
| accessIPv6 | |
| progress | 0 |
| OS-EXT-
| OS-EXT-
| config_drive | 1 |
+------
I checked the compute logs for CN10 and cn4 and on the source host CN10 I found an exception for an InstanceNotFound coming from the nova.virt.
For some history here, change I19fa61d467edd5
https:/
Now for this bug, it looks like if the instance was migrated, when we check the power_state on the instance, the old host is being asked to get the state but the instance has migrated and we get the InstanceNotFound (which is swallowed here):
https:/
tags: | removed: hyper-v |
Changed in nova: | |
importance: | Undecided → High |
Changed in nova: | |
milestone: | none → havana-2 |
status: | Fix Committed → Fix Released |
Changed in nova: | |
milestone: | havana-2 → 2013.2 |
[root@ngp02-hv1 ~]# nova availability- zone-list ------- ------- ------- -----+- ------- ------- ------- ------- ------- ----+ ------- ------- ------- -----+- ------- ------- ------- ------- ------- ----+ private. cloud.com | | 03T19:39: 24.152893 | 03T19:39: 16.801537 | 03T19:39: 18.054133 | 03T19:39: 17.842316 | 03T19:39: 24.467889 | 03T19:39: 18.174124 | 03T19:39: 20.555113 | private. cloud.com | | 03T19:39: 20.805885 | 03T19:39: 22.751993 | 03T19:39: 17.992623 | 03T19:39: 19.901133 | 03T19:39: 18.504939 | ------- ------- ------- -----+- ------- ------- ------- ------- ------- ----+
+------
| Name | Status |
+------
| internal | available |
| |- ngp02-hv1.
| | |- nova-cert | enabled :-) 2013-07-
| | |- nova-conductor | enabled :-) 2013-07-
| | |- nova-consoleauth | enabled :-) 2013-07-
| | |- nova-scheduler | enabled :-) 2013-07-
| | |- nova-console | enabled :-) 2013-07-
| | |- nova-cells | enabled :-) 2013-07-
| nova | available |
| |- cn6 | |
| | |- nova-compute | enabled :-) 2013-07-
| |- ngp02-hv1.
| | |- nova-compute | enabled :-) 2013-07-
| |- cn4 | |
| | |- nova-compute | enabled :-) 2013-07-
| |- cn8 | |
| | |- nova-compute | enabled :-) 2013-07-
| |- CN10 | |
| | |- nova-compute | enabled :-) 2013-07-
| |- cn12 | |
| | |- nova-compute | enabled :-) 2013-07-
+------