vmwareapi: unrescue instance failed due to can't detach disk from running instance
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Fix Released
|
High
|
dingxy | ||
Havana |
Fix Released
|
High
|
Gary Kotton | ||
Icehouse |
Fix Released
|
High
|
Gary Kotton |
Bug Description
I use openstack icehouse build, when unrescue a rescued instance based on vcenter driver, the instance became to ERROR status, and when nova show we hit error below:
{u'message': u'The attempted operation cannot be performed in the current state (Powered on).', u'code': 500, u'details': u' File "/usr/lib/
| | return function(self, context, *args, **kwargs) |
| | File "/usr/lib/
| | network_info) |
| | File "/usr/lib/
| | _vmops.
| | File "/usr/lib/
| | self._volumeops
| | File "/usr/lib/
| | self._session.
| | File "/usr/lib/
| | ret_val = done.wait() |
| | File "/usr/lib/
| | return hubs.get_
| | File "/usr/lib/
| | return self.greenlet.
summary: |
- un rescue a RESCUE status instance failed + unrescue a RESCUE status instance with vcenter driver failed |
tags: | added: vmwareapi |
Changed in nova: | |
status: | New → Confirmed |
tags: | added: havana-backport-potential vmware |
Changed in nova: | |
importance: | Undecided → Medium |
tags: |
added: icehouse-backport-potential removed: icehouse-rc-potential |
Changed in nova: | |
importance: | Medium → High |
tags: |
added: icehouse-rc-potential removed: icehouse-backport-potential |
Changed in nova: | |
status: | In Progress → Fix Committed |
tags: |
added: icehouse-backport-potential removed: icehouse-rc-potential |
tags: | removed: havana-backport-potential icehouse-backport-potential in-stable-havana in-stable-icehouse |
Changed in nova: | |
milestone: | none → juno-1 |
status: | Fix Committed → Fix Released |
Changed in nova: | |
milestone: | juno-1 → 2014.2 |
The roort cause is that we can't detach Non-Hot Plug disk from running instance, a proposed fix like: /github. com/openstack/ nova/blob/ master/ nova/virt/ vmwareapi/ vmops.py# L1132 get_vmdk_ volume_ disk(hardware_ devices, path=vmdk_path) off(instance, vm_ref= vm_rescue_ ref) .detach_ disk_from_ vm(vm_rescue_ ref, r_instance, device) r_instance, None, instance_ name=instance_ name) on(instance) get_vm_ ref(self. _session, instance)
https:/
1131 device = vm_util.
1132 +self.power_
1133 self._volumeops
1134 self.destroy(
1135 self._power_
1136
1137 +def power_off(self, instance, vm_ref=None):
1138 """Power off the specified instance."""
1139 + if not vm_ref:
1140 + vm_ref = vm_util.