← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1782393] Re: hypervisor local_gb_used still reports usage even with volume-backed instances after fix for bug 1469179

 

Reviewed:  https://review.openstack.org/584204
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=f63fd14975cda83d24121b010cbedfc3a7e5ff1f
Submitter: Zuul
Branch:    master

commit f63fd14975cda83d24121b010cbedfc3a7e5ff1f
Author: Kevin_Zheng <zhengzhenyu@xxxxxxxxxx>
Date:   Fri Jul 20 10:38:30 2018 +0800

    Report 0 root_gb in resource tracker if instance is bfv.
    
    hypervisor local_gb_used still reports usage even with volume-backed
    instances after fix for bug 1469179.
    
    This is because of some code in the resource tracker that is not
    boot-from-volume aware when reporting disk usage, it just gets the
    root_gb off the flavor:
    
    https://github.com/openstack/nova/blob/eb4f65a7951e921b1cd8d05713e144e72f2f254f/nova/compute/resource_tracker.py#L1455
    
    This patch simply check if the instance is bfv before returning
    the result. If it's a volume-backed instance and report 0 for root_gb if
    that's the case.
    
    Change-Id: I0839470c4bcfb16590a0d87b306d683b059bf8a9
    Closes-bug: #1782393


** Changed in: nova
       Status: In Progress => Fix Released

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

Title:
  hypervisor local_gb_used still reports usage even with volume-backed
  instances after fix for bug 1469179

Status in OpenStack Compute (nova):
  Fix Released

Bug description:
  While testing the (partial) fix for bug 1469179:

  https://review.openstack.org/#/c/580720/

  Someone reported that nova hypervisor-statistics still reported
  local_gb_used, even though 'openstack resource provider allocation
  show' for the instance didn't report DISK_GB usage.

  This is because of some code in the resource tracker that is not boot-
  from-volume aware when reporting disk usage, it just gets the root_gb
  off the flavor:

  https://github.com/openstack/nova/blob/eb4f65a7951e921b1cd8d05713e144e72f2f254f/nova/compute/resource_tracker.py#L1455

  We have an instance uuid in scope for the callers of that code so we
  should be able to determine if it's a volume-backed instance and
  report 0 for root_gb if that's the case.

  Long-term, once we drop the CachingScheduler and we can rely on
  allocations in placement, we should just change this code to report
  the disk usage based on the DISK_GB allocation against the given
  compute node provider for the given consumer (instance or migration
  record).

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


References