← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1870357] Re: raw disk usage is not correctly reported during resource update

 

** Also affects: nova/train
   Importance: Undecided
       Status: New

** Changed in: nova/train
       Status: New => 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/1870357

Title:
  raw disk usage is not correctly reported  during resource update

Status in OpenStack Compute (nova):
  Fix Released
Status in OpenStack Compute (nova) train series:
  Fix Released

Bug description:
  Description
  ===========

  available_disk_least r(free disk for a new instance) seems not be calculated
  correctly when instance is in raw (images_type=raw) and preallocate_space option is not set.
  This may lead  placement/scheduler to take wrong decision regarding space availabilty on hosts.

  when total amount of over_committed_disk_size is evaluated on a host, it seems that in 
  raw disk type case it is always set to 0.

  
  Steps to reproduce

  ===========
  on a master devstack:

  . devstack/openrc admin admin
  $openstack hypervisor show alex-devstack | grep  available_least
  | disk_available_least | 381

  # create an instance with 80GB of disk with qcow2 by default:
  $openstack server create  --flavor m1.large --image cirros-0.4.0-x86_64-disk --nic net-id=private  alex

  # few seconds later we can see disk available is minus by 80, all is fine.
  $ openstack hypervisor show alex-devstack | grep  available_least
  | disk_available_least | 301     

  # delete instance
  $ openstack server delete xxx

  # Now set images_type = raw in [libvirt] section in /etc/nova/nova-cpu.conf
  $ grep images_type /etc/nova/nova-cpu.conf 
  images_type = raw
  # restart compute
  $ sudo service devstack@n-cpu restart

  # respawn the same instance, it will create a instance with raw disk now
  $openstack server create  --flavor m1.large --image cirros-0.4.0-x86_64-disk --nic net-id=private  alex

  # few seconds later we can see disk available is minus by only by 3GB which is not correct:
  openstack hypervisor show alex-devstack | grep  available_least
  | disk_available_least | 378

  # only allocated size use is decreased:
  $ ls -lhs /opt/stack/data/nova/instances/31e46f53-6223-40c3-ad84-0f19d10b52be/disk
  2.6G -rw-r--r-- 1 libvirt-qemu kvm 80G Apr  1 10:00 /opt/stack/data/nova/instances/31e46f53-6223-40c3-ad84-0f19d10b52be/disk

  Expected result
  ===============
  calculation of over_committed_disk_size must be done for raw disk (at least on not preallocated one)

  Actual result
  =============
  over_committed_disk_size is set to 0 in all cases for raw disk.

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


References