2015-12-11 01:57:50 |
nail-zte |
description |
The method _get_instance_disk_info() in libvirt driver will get volume size from lvm.py using logical volume path.When the volume path is not exist,it will raise “VolumeBDMPathNotFound”,while "ProcessExecutionError" directly with other problems.Related codes as following:
try:
out, _err = utils.execute('blockdev', '--getsize64', path,
run_as_root=True)
except processutils.ProcessExecutionError:
if not utils.path_exists(path):
raise exception.VolumeBDMPathNotFound(path=path)
else:
raise
So, in this case, if the logical volume path is exactly exists, but something wrong with the backend to get volume size, it will raise "ProcessExecutionError". The point is that libvirt driver would not catch the "ProcessExecutionError" exception, this nova-compute service down finally.Then because of guard.sevice nova-compute will restart over and over again.
Code in libvirt driver as following:
dk_size = lvm.get_volume_size(path)
We think the error appeared in backend should not infact the nova-compute service.
we think we can catch ProcessExecutionError in libvirt dirver and set dk_size = 0.
This bug appeared in Kilo as well as Liberty. |
The method _get_instance_disk_info() in libvirt driver will get volume size from lvm.py using logical volume path.When the volume path is not exist,it will raise “VolumeBDMPathNotFound”,while "ProcessExecutionError" directly with other problems.Related codes as following:
try:
out, _err = utils.execute('blockdev', '--getsize64', path,
run_as_root=True)
except processutils.ProcessExecutionError:
if not utils.path_exists(path):
raise exception.VolumeBDMPathNotFound(path=path)
else:
raise
So, in this case, if the logical volume path is exactly exists, but something wrong with the backend to get volume size, it will raise "ProcessExecutionError". The point is that libvirt driver would not catch the "ProcessExecutionError" exception, this nova-compute service down finally.Then because of guard.sevice, nova-compute will restart over and over again.
Code in libvirt driver as following:
dk_size = lvm.get_volume_size(path)
We think the error appeared in backend should not infact the nova-compute service.
we think we can catch ProcessExecutionError in libvirt dirver and set dk_size = 0.
This bug appeared in Kilo as well as Liberty. |
|