← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1517442] [NEW] libvirt/xenapi: disk_available_least reported by the driver does not take into account instances being migrated to/from the host

 

Public bug reported:

Looking briefly at the code of other drivers that try to report this
(xenapi and ironic) - it is also likely broken for at least xenapi.

The crux of the issue is that resource tracker works by looking at the
instances Nova knows about, and also the ongoing migration, so anything
that is reported by any of the virt drivers as part of the dictionary
returned from get_available_resource should only be based on the
available resources and should never try to factor in any resource
usage. Only the resource tracker holding the global resource lock
(COMPUTE_RESOURCE_SEMAPHORE) knows the current usage of resources since
it can take into account migrations that are in flight etc.

Unfortunately, both libvirt and xenapi (I think) try to look at the
instance currently know by the hypervisor, which is not all instances we
should be taking into account, and deduce the final disk_available_least
number.

To fix this we would have to rework how disk_available least is
calculated - we'd have to make sure the drivers only report the total
available space, and then make sure we update the usage _for each
instance and migration_ to come up with the final number.

** Affects: nova
     Importance: High
         Status: New


** Tags: libvirt resource-tracker xen

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

Title:
  libvirt/xenapi: disk_available_least reported by the driver does not
  take into account instances being migrated to/from the host

Status in OpenStack Compute (nova):
  New

Bug description:
  Looking briefly at the code of other drivers that try to report this
  (xenapi and ironic) - it is also likely broken for at least xenapi.

  The crux of the issue is that resource tracker works by looking at the
  instances Nova knows about, and also the ongoing migration, so
  anything that is reported by any of the virt drivers as part of the
  dictionary returned from get_available_resource should only be based
  on the available resources and should never try to factor in any
  resource usage. Only the resource tracker holding the global resource
  lock (COMPUTE_RESOURCE_SEMAPHORE) knows the current usage of resources
  since it can take into account migrations that are in flight etc.

  Unfortunately, both libvirt and xenapi (I think) try to look at the
  instance currently know by the hypervisor, which is not all instances
  we should be taking into account, and deduce the final
  disk_available_least number.

  To fix this we would have to rework how disk_available least is
  calculated - we'd have to make sure the drivers only report the total
  available space, and then make sure we update the usage _for each
  instance and migration_ to come up with the final number.

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