No bootable device when evacuate a instance on shared_storage_storage ceph
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
New
|
Undecided
|
Unassigned |
Bug Description
Nova Verion:
Ceph Verion:ceph version 10.2.2 (45107e21c568dd
When i test nova evacuate function i found after the instance evacuated it cant not boot normally.
By the vnc console i see "No bootable device" info.
Through some tests i found the reason: when u used the shared storage the rebuild task flow will not get the image meta again. So if u set meta for the image, the problem occur.
The code:
nova/compute/
@object_compat
@messaging.
@wrap_exception()
@reverts_
@wrap_
@wrap_
def rebuild_
injected_files, new_pass,
orig_
bdms, recreate, on_shared_storage,
preserve_
......
if on_shared_storage != self.driver.
raise exception.
" storage"))
if on_shared_storage:
LOG.info(
' existing disk'))
else:
image_ref = orig_image_ref = instance.image_ref
LOG.info(
" '%s'"), str(image_ref))
# NOTE(mriedem): On a recreate (evacuate), we need to update
# the instance's host and node properties to reflect it's
# destination node for the recreate.
node_name = None
try:
compute_node = self._get_
node_name = compute_
except exception.
LOG.exception
finally:
instance.host = self.host
instance.node = node_name
instance.save()
if image_ref:
image_meta = self.image_
else:
image_meta = {}
......
Bellow is my image info
+------
| Property | Value |
+------
| OS-EXT-
| created | 2016-09-
| id | 8b218b4d-
| metadata hw_disk_bus | scsi |
| metadata hw_qemu_guest_agent | yes |
| metadata hw_scsi_model | virtio-scsi |
| minDisk | 0 |
| minRam | 0 |
| name | zptest-20160920 |
| progress | 100 |
| status | ACTIVE |
| updated | 2016-10-
+------
I found the same bug: /bugs.launchpad .net/nova/ +bug/1562681
https:/
but in Kilo i update like this:
nova/compute/ manager. py
the rebuild_instance function update from:
if on_shared_storage: _LI('disk on shared storage, recreating using' _LI("disk not on shared storage, rebuilding from:"
LOG.info(
' existing disk'))
else:
image_ref = orig_image_ref = instance.image_ref
LOG.info(
" '%s'"), str(image_ref))
to
image_ref = orig_image_ref = instance.image_ref _LI("rebuilding from:'%s'"), str(image_ref))
LOG.info(