nova/nova/virt
Lee Yarwood c46ef969f6 libvirt: Use os.stat and os.path.getsize for RAW disk inspection
At present when inspecting a file based image we always use ``qemu-img`` to
determine the virtual size of the image. This works well but can lead to
the resource tracker taking considerable time to update on hosts with
a large number of instances/images.

This change switches to using os.stat and os.path.getsize to determine
the allocated and virtual disk sizes of RAW disks.

Future changes will look into caching the virtual size of the disk
within disk.info locally on the host to also improve this for qcow2 and
ploop, further simplifying this code path.

Closes-bug: #1785827
Change-Id: Ic5c41493dcdcd807209be2beaae0dbbdf5d2ba3f
(cherry picked from commit e6af812865)
(cherry picked from commit bda6173a84)
(cherry picked from commit b58805753a)
2018-12-14 10:24:53 +00:00
..
disk libvirt: Reduce calls to qemu-img during update_available_resource 2018-12-14 10:24:47 +00:00
hyperv propagate OSError to MigrationPreCheckError 2017-10-26 09:16:55 +00:00
image libvirt: virtuozzo instance resize support 2016-06-28 22:13:49 +03:00
ironic ironic: Get correct inventory for deployed node 2018-04-17 14:20:42 +00:00
libvirt libvirt: Use os.stat and os.path.getsize for RAW disk inspection 2018-12-14 10:24:53 +00:00
powervm Stringify instance UUID 2018-05-24 14:11:44 +00:00
vmwareapi Remove translation of log messages 2017-06-13 11:20:28 +07:00
xenapi xenapi: avoid unnecessary BDM query when building device metadata 2017-07-06 13:29:43 -04:00
__init__.py Declare nova.virt namespace 2016-04-28 15:01:44 +00:00
block_device.py block_device: Rollback volumes to in-use on DeviceDetachFailed 2018-08-10 16:39:04 +01:00
configdrive.py Fixes python 3 unit tests 2016-09-23 20:10:24 +00:00
driver.py Fix NoneType error in _notify_volume_usage_detach 2018-11-01 17:29:11 -04:00
event.py Add 'suspended' lifecycle event 2015-04-03 03:59:20 +03:00
fake.py libvirt: Block swap volume attempts with encrypted volumes prior to Queens 2018-04-17 14:29:43 +00:00
firewall.py Merge "Remove translation of log messages" 2017-06-20 21:16:49 +00:00
hardware.py Fixes 'Not enough available memory' log message 2018-01-22 10:36:19 +00:00
imagecache.py Rename ImageCacheManager._list_base_images to _scan_base_images 2016-05-26 14:45:42 +01:00
images.py libvirt: handle DiskNotFound during update_available_resource 2018-05-31 10:50:05 +01:00
interfaces.template
netutils.py provide interface-scoped nameserver information 2017-07-19 21:08:59 -04:00
osinfo.py Remove translation of log messages 2017-06-13 11:20:28 +07:00
storage_users.py Remove translation of log messages 2017-06-13 11:20:28 +07:00
virtapi.py Remove unused provider firewall rules functionality in nova 2016-02-01 15:50:04 +01:00
volumeutils.py nova.utils._get_root_helper() should be public 2015-08-19 04:00:50 +00:00