can not finish _get_disk_over_committed_size_total if vm disk not foubd

Bug #1827032 reported by lipanpan on 2019-04-30
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
nova-hyper
Undecided
Unassigned

Bug Description

in queen version of openstack nova, if there is a running vm which was not created by nova, and its image disk was deleted, update_available_resource_for_node will be failed. And this also affects live-migration when poet_live_migration on the src node.

In the source compute node, error like this:

2019-04-30 09:23:30.568 86771 ERROR nova.compute.manager [req-6e5a210e-8587-4b62-985f-af56124d863b c7c19cf76f8e495e8011363150e6da3e 44fa4834628c484899c5d85ffeeafb94 - default default] Error updating resources for node armControl.: DiskNotFound: No disk at /var/lib/libvirt/images/aarch64-01-2.qcow2
2019-04-30 09:23:30.568 86771 ERROR nova.compute.manager Traceback (most recent call last):
2019-04-30 09:23:30.568 86771 ERROR nova.compute.manager File "/usr/lib/python2.7/site-packages/nova/compute/manager.py", line 7426, in update_available_resource_for_node
2019-04-30 09:23:30.568 86771 ERROR nova.compute.manager rt.update_available_resource(context, nodename)
2019-04-30 09:23:30.568 86771 ERROR nova.compute.manager File "/usr/lib/python2.7/site-packages/nova/compute/resource_tracker.py", line 672, in update_available_resource
2019-04-30 09:23:30.568 86771 ERROR nova.compute.manager resources = self.driver.get_available_resource(nodename)
2019-04-30 09:23:30.568 86771 ERROR nova.compute.manager File "/usr/lib/python2.7/site-packages/nova/virt/libvirt/driver.py", line 6451, in get_available_resource
2019-04-30 09:23:30.568 86771 ERROR nova.compute.manager disk_over_committed = self._get_disk_over_committed_size_total()
2019-04-30 09:23:30.568 86771 ERROR nova.compute.manager File "/usr/lib/python2.7/site-packages/nova/virt/libvirt/driver.py", line 8009, in _get_disk_over_committed_size_total
2019-04-30 09:23:30.568 86771 ERROR nova.compute.manager err_ctxt.reraise = False
2019-04-30 09:23:30.568 86771 ERROR nova.compute.manager File "/usr/lib/python2.7/site-packages/oslo_utils/excutils.py", line 220, in __exit__
2019-04-30 09:23:30.568 86771 ERROR nova.compute.manager self.force_reraise()
2019-04-30 09:23:30.568 86771 ERROR nova.compute.manager File "/usr/lib/python2.7/site-packages/oslo_utils/excutils.py", line 196, in force_reraise
2019-04-30 09:23:30.568 86771 ERROR nova.compute.manager six.reraise(self.type_, self.value, self.tb)
2019-04-30 09:23:30.568 86771 ERROR nova.compute.manager File "/usr/lib/python2.7/site-packages/nova/virt/libvirt/driver.py", line 7955, in _get_disk_over_committed_size_total
2019-04-30 09:23:30.568 86771 ERROR nova.compute.manager config, block_device_info)
2019-04-30 09:23:30.568 86771 ERROR nova.compute.manager File "/usr/lib/python2.7/site-packages/nova/virt/libvirt/driver.py", line 7857, in _get_instance_disk_info_from_config
2019-04-30 09:23:30.568 86771 ERROR nova.compute.manager qemu_img_info = disk_api.get_disk_info(path)
2019-04-30 09:23:30.568 86771 ERROR nova.compute.manager File "/usr/lib/python2.7/site-packages/nova/virt/disk/api.py", line 136, in get_disk_info
2019-04-30 09:23:30.568 86771 ERROR nova.compute.manager return images.qemu_img_info(path)
2019-04-30 09:23:30.568 86771 ERROR nova.compute.manager File "/usr/lib/python2.7/site-packages/nova/virt/images.py", line 57, in qemu_img_info
2019-04-30 09:23:30.568 86771 ERROR nova.compute.manager raise exception.DiskNotFound(location=path)
2019-04-30 09:23:30.568 86771 ERROR nova.compute.manager DiskNotFound: No disk at /var/lib/libvirt/images/centos-01.qcow2
2019-04-30 09:23:30.568 86771 ERROR nova.compute.manager

In /var/lib/libvirt/images/ directory, there is no centos--1.qcow2 file.

nova version:
# rpm -qa | grep nova-
python-nova-17.0.10-1.el7.noarch
openstack-nova-common-17.0.10-1.el7.noarch
openstack-nova-compute-17.0.10-1.el7.noarch

In the method _get_disk_over_committed_size_total of virt/libvirt/driver.py file, we get all instance's disk info even if the instance was not created by nova, and the instance's image disk may be deleted.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers