← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1635160] Re: No bootable device when evacuate a instance on shared_storage_storage ceph

 

*** This bug is a duplicate of bug 1562681 ***
    https://bugs.launchpad.net/bugs/1562681

** Tags added: evacuate

** This bug has been marked a duplicate of bug 1562681
   Post instance evacuation, image metadata is not retained when using shared storage

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1635160

Title:
  No bootable device when evacuate a instance on shared_storage_storage
  ceph

Status in OpenStack Compute (nova):
  New

Bug description:
  Nova Verion:nova-kilo-2015.1.1
  Ceph Verion:ceph version 10.2.2 (45107e21c568dd033c2f0a3107dec8f0b0e58374)

  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/manager.py

   @object_compat
   @messaging.expected_exceptions(exception.PreserveEphemeralNotSupported)
   @wrap_exception()
   @reverts_task_state
   @wrap_instance_event
   @wrap_instance_fault
   def rebuild_instance(self, context, instance, orig_image_ref, image_ref,
     injected_files, new_pass,
        orig_sys_metadata,
     bdms, recreate, on_shared_storage,
     preserve_ephemeral=False):
      ......

  if on_shared_storage != self.driver.instance_on_disk(instance):
    raise exception.InvalidSharedStorage(_("Invalid state of instance files on shared"
      " storage"))

  if on_shared_storage:
    LOG.info(_LI('disk on shared storage, recreating using'
           ' existing disk'))
  else:
    image_ref = orig_image_ref = instance.image_ref
    LOG.info(_LI("disk not on shared storage, rebuilding from:"
           " '%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_compute_info(context, self.host)
       node_name = compute_node.hypervisor_hostname
  except exception.ComputeHostNotFound:
    LOG.exception(_LE('Failed to get compute_info for %s'),self.host)
  finally:
    instance.host = self.host
    instance.node = node_name
    instance.save()

  if image_ref:
    image_meta = self.image_api.get(context, image_ref)
  else:
    image_meta = {}
  ......

  Bellow is my image info
  +------------------------------+--------------------------------------+
  | Property                     | Value                                |
  +------------------------------+--------------------------------------+
  | OS-EXT-IMG-SIZE:size         | 53687091200                          |
  | created                      | 2016-09-20T08:15:21Z                 |
  | id                           | 8b218b4d-74ff-44af-bc4c-c37fb1106b03 |
  | 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-20T07:38:54Z                 |
  +------------------------------+--------------------------------------+

To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1635160/+subscriptions


References