← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1524726] [NEW] nova-compute restart over ande over again when the right volume path cannot get volume size

 

Public bug reported:

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.

** Affects: nova
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1524726

Title:
  nova-compute restart over ande over again when the right volume path
  cannot get volume size

Status in OpenStack Compute (nova):
  New

Bug 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.

To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1524726/+subscriptions