]> xenbits.xensource.com Git - osstest/openstack-nova.git/commit
Calculate stopped instance's disk sizes for disk_available_least
authorRikimaru Honjo <honjo.rikimaru@po.ntt-tx.co.jp>
Fri, 26 May 2017 05:04:44 +0000 (14:04 +0900)
committerTakashi NATSUME <natsume.takashi@lab.ntt.co.jp>
Wed, 14 Jun 2017 01:50:01 +0000 (10:50 +0900)
commit2a113159c00b51215f3506a9e9834fa7cc0d5ffb
tree8c7c5686184345f0e3cb3c67bfeccebacb3e4a82
parent371a97c89ae59981fe3bd65fc89b08bb4d256f8e
Calculate stopped instance's disk sizes for disk_available_least

disk_available_least is a free disk size information of hypervisors.
This is calculated by the following fomula:

disk_available_least = <free disk size> - <Total gap between virtual
disk size and actual disk size for all instances>

But stopped instance's virtual disk sizes were not calculated
after merging following patch in Juno cycle:
https://review.openstack.org/#/c/105127

So disk_available_least might be larger than actual free disk size.
As a result, instances might be scheduled beyond the actual free
disk size if stopped instances were on a host.

This patch fix it.
Stopped instance's disks will be calculated after merging this patch.

Change-Id: I8abf6edfa80e3920539e4f6d4906c573f9543b91
Closes-Bug: #1693679
(cherry-picked from commit 3342215034c7a7a938c497c39f6405763201a261)
nova/tests/unit/virt/libvirt/test_driver.py
nova/virt/libvirt/driver.py