← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1406103] [NEW] Live migration fails because of libvirt's bios uuid checking

 

Public bug reported:

Summary:
When live-migrating a virtual machine from a compute node to another one with the same bios uuid, libvirt would fail the migration because of the bios uuid checking.

nova-compute.log from the source node:
2014-12-27 05:23:19.889 1923 ERROR nova.virt.libvirt.driver [-] [instance: a0c91586-afaf-49d7-8799-0a17e3087c56] Live Migration failure: internal error: Attempt to migrate guest to the same host 564d1e3d-01e7-fd2e-0185-625ea40bd715

Scenario:
When cloning a new compute node from an existing one, bios uuid usually remains the same, this issue happens when launching a live-migration between two compute nodes with the same bios uuid.
Both nodes should be based on KVM, libvirt.

Location:
*********************************************************************
Libvirt 1.2.2
path: /src/qemu/qemu_migration.c
function: static int qemuMigrationCookieXMLParse(qemuMigrationCookiePtr mig, virQEMUDriverPtr driver, xmlDocPtr doc, xmlXPathContextPtr ctxt, unsigned int flags)
line: 825:
if (STREQ(mig->remoteHostname, mig->localHostname))
{
	virReportError(VIR_ERR_INTERNAL_ERROR, _("Attempt to migrate guest to the same host %s"), mig->remoteHostname);
	goto error;
}

line 842:
if (memcmp(mig->remoteHostuuid, mig->localHostuuid, VIR_UUID_BUFLEN) == 0)
{
	virReportError(VIR_ERR_INTERNAL_ERROR, _("Attempt to migrate guest to the same host %s"), tmp);
	goto error;
}
*********************************************************************
nova Icehouse
/nova/conductor/tasks/live_migrate.py
class: LiveMigrationTask
function: def _check_destination_is_not_source(self):
line 102:
def _check_destination_is_not_source(self):
        if self.destination == self.source:
            raise exception.UnableToMigrateToSelf(
                    instance_id=self.instance.uuid, host=self.destination)
*********************************************************************
>From above we can see that libvirt checks both the hostnames and bios uuids of both hosts, but nova only checks the hostnames.

Request:
The error message from libvirt is obscure and not that helpful, because it's hard for an admin to tell what 564d1e3d-01e7-fd2e-0185-625ea40bd715 is, and the bios uuid is not a commonly known concept.
OpenStack's same host checking should be consistent with libvirt's checkings, no matter whether allowing for the same bios uuid nodes or not. At least a clear error message should be given.

** Affects: nova
     Importance: Undecided
         Status: New

-- 
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/1406103

Title:
  Live migration fails because of libvirt's bios uuid checking

Status in OpenStack Compute (Nova):
  New

Bug description:
  Summary:
  When live-migrating a virtual machine from a compute node to another one with the same bios uuid, libvirt would fail the migration because of the bios uuid checking.

  nova-compute.log from the source node:
  2014-12-27 05:23:19.889 1923 ERROR nova.virt.libvirt.driver [-] [instance: a0c91586-afaf-49d7-8799-0a17e3087c56] Live Migration failure: internal error: Attempt to migrate guest to the same host 564d1e3d-01e7-fd2e-0185-625ea40bd715

  Scenario:
  When cloning a new compute node from an existing one, bios uuid usually remains the same, this issue happens when launching a live-migration between two compute nodes with the same bios uuid.
  Both nodes should be based on KVM, libvirt.

  Location:
  *********************************************************************
  Libvirt 1.2.2
  path: /src/qemu/qemu_migration.c
  function: static int qemuMigrationCookieXMLParse(qemuMigrationCookiePtr mig, virQEMUDriverPtr driver, xmlDocPtr doc, xmlXPathContextPtr ctxt, unsigned int flags)
  line: 825:
  if (STREQ(mig->remoteHostname, mig->localHostname))
  {
  	virReportError(VIR_ERR_INTERNAL_ERROR, _("Attempt to migrate guest to the same host %s"), mig->remoteHostname);
  	goto error;
  }

  line 842:
  if (memcmp(mig->remoteHostuuid, mig->localHostuuid, VIR_UUID_BUFLEN) == 0)
  {
  	virReportError(VIR_ERR_INTERNAL_ERROR, _("Attempt to migrate guest to the same host %s"), tmp);
  	goto error;
  }
  *********************************************************************
  nova Icehouse
  /nova/conductor/tasks/live_migrate.py
  class: LiveMigrationTask
  function: def _check_destination_is_not_source(self):
  line 102:
  def _check_destination_is_not_source(self):
          if self.destination == self.source:
              raise exception.UnableToMigrateToSelf(
                      instance_id=self.instance.uuid, host=self.destination)
  *********************************************************************
  From above we can see that libvirt checks both the hostnames and bios uuids of both hosts, but nova only checks the hostnames.

  Request:
  The error message from libvirt is obscure and not that helpful, because it's hard for an admin to tell what 564d1e3d-01e7-fd2e-0185-625ea40bd715 is, and the bios uuid is not a commonly known concept.
  OpenStack's same host checking should be consistent with libvirt's checkings, no matter whether allowing for the same bios uuid nodes or not. At least a clear error message should be given.

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


Follow ups

References