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.
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 “VolumeBDMPathN otFound” ,while "ProcessExecuti onError" directly with other problems.Related codes as following:
try: 'blockdev' , '--getsize64', path,
run_ as_root= True) ProcessExecutio nError: exists( path): VolumeBDMPathNo tFound( path=path)
out, _err = utils.execute(
except processutils.
if not utils.path_
raise exception.
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 "ProcessExecuti onError" . The point is that libvirt driver would not catch the "ProcessExecuti onError" 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: volume_ size(path)
dk_size = lvm.get_
We think the error appeared in backend should not infact the nova-compute service. nError in libvirt dirver and set dk_size = 0.
we think we can catch ProcessExecutio
This bug appeared in Kilo as well as Liberty.