Comment 0 for bug 1524726

Revision history for this message
nail-zte (nail-i) wrote :

The method _get_instance_disk_info() in libvirt driver will get volume size from 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:

        out, _err = utils.execute('blockdev', '--getsize64', path,
except processutils.ProcessExecutionError:
        if not utils.path_exists(path):
            raise exception.VolumeBDMPathNotFound(path=path)

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.