← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1922742] [NEW] Failed: can't get Volume Group information from /dev/sda1

 

Public bug reported:

When running tests in LXD VMs (LXD containers don't perform disk setup,
as they don't have their own disks), I see:

2021-04-06 14:31:24,084 - helpers.py[DEBUG]: Running config-growpart using lock (<cloudinit.helpers.DummyLock object at 0x7f11232ef490>)
2021-04-06 14:31:24,084 - cc_growpart.py[DEBUG]: No 'growpart' entry in cfg.  Using default: {'mode': 'auto', 'devices': ['/'], 'ignore_growroot_disabled': False}
2021-04-06 14:31:24,084 - subp.py[DEBUG]: Running command ['growpart', '--help'] with allowed return codes [0] (shell=False, capture=True)
2021-04-06 14:31:24,092 - util.py[DEBUG]: Reading from /proc/503/mountinfo (quiet=False)
2021-04-06 14:31:24,092 - util.py[DEBUG]: Read 3726 bytes from /proc/503/mountinfo
2021-04-06 14:31:24,093 - subp.py[DEBUG]: Running command ['lvm', 'lvs', '/dev/sda1', '--options=vgname', '--noheadings'] with allowed return codes [0] (shell=False, capture=True)
2021-04-06 14:31:24,138 - util.py[WARNING]: Failed: can't get Volume Group information from /dev/sda1
2021-04-06 14:31:24,138 - util.py[DEBUG]: Failed: can't get Volume Group information from /dev/sda1
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/cloudinit/config/cc_growpart.py", line 125, in get_pvs_for_lv
    (out, _err) = subp.subp(["lvm", "lvs", devpath, "--options=vgname",
  File "/usr/lib/python3/dist-packages/cloudinit/subp.py", line 293, in subp
    raise ProcessExecutionError(stdout=out, stderr=err,
cloudinit.subp.ProcessExecutionError: Unexpected error while running command.
Command: ['lvm', 'lvs', '/dev/sda1', '--options=vgname', '--noheadings']
Exit code: 5
Reason: -
Stdout: 
Stderr:   Volume group "sda1" not found
          Cannot process volume group sda1
2021-04-06 14:31:24,140 - util.py[DEBUG]: resize_devices took 0.048 seconds
2021-04-06 14:31:24,140 - handlers.py[DEBUG]: finish: init-network/config-growpart: FAIL: running config-growpart with frequency always
2021-04-06 14:31:24,140 - util.py[WARNING]: Running module growpart (<module 'cloudinit.config.cc_growpart' from '/usr/lib/python3/dist-packages/cloudinit/config/cc_growpart.py'>) failed
2021-04-06 14:31:24,142 - util.py[DEBUG]: Running module growpart (<module 'cloudinit.config.cc_growpart' from '/usr/lib/python3/dist-packages/cloudinit/config/cc_growpart.py'>) failed
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/cloudinit/config/cc_growpart.py", line 125, in get_pvs_for_lv
    (out, _err) = subp.subp(["lvm", "lvs", devpath, "--options=vgname",
  File "/usr/lib/python3/dist-packages/cloudinit/subp.py", line 293, in subp
    raise ProcessExecutionError(stdout=out, stderr=err,
cloudinit.subp.ProcessExecutionError: Unexpected error while running command.
Command: ['lvm', 'lvs', '/dev/sda1', '--options=vgname', '--noheadings']
Exit code: 5
Reason: -
Stdout: 
Stderr:   Volume group "sda1" not found
          Cannot process volume group sda1

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/cloudinit/stages.py", line 884, in _run_modules
    ran, _r = cc.run(run_name, mod.handle, func_args,
  File "/usr/lib/python3/dist-packages/cloudinit/cloud.py", line 54, in run
    return self._runners.run(name, functor, args, freq, clear_on_fail)
  File "/usr/lib/python3/dist-packages/cloudinit/helpers.py", line 185, in run
    results = functor(*args)
  File "/usr/lib/python3/dist-packages/cloudinit/config/cc_growpart.py", line 434, in handle
    resized = util.log_time(logfunc=log.debug, msg="resize_devices",
  File "/usr/lib/python3/dist-packages/cloudinit/util.py", line 2348, in log_time
    ret = func(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/cloudinit/config/cc_growpart.py", line 358, in resize_devices
    disk, ptnum = device_part_info(blockdev, is_lvm)
  File "/usr/lib/python3/dist-packages/cloudinit/config/cc_growpart.py", line 273, in device_part_info
    lvm_rpath = get_pvs_for_lv(devpath)
  File "/usr/lib/python3/dist-packages/cloudinit/config/cc_growpart.py", line 132, in get_pvs_for_lv
    raise ResizeFailedException(e) from e
cloudinit.config.cc_growpart.ResizeFailedException: Unexpected error while running command.
Command: ['lvm', 'lvs', '/dev/sda1', '--options=vgname', '--noheadings']
Exit code: 5
Reason: -
Stdout: 
Stderr:   Volume group "sda1" not found
          Cannot process volume group sda1

** Affects: cloud-init
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to cloud-init.
https://bugs.launchpad.net/bugs/1922742

Title:
  Failed: can't get Volume Group information from /dev/sda1

Status in cloud-init:
  New

Bug description:
  When running tests in LXD VMs (LXD containers don't perform disk
  setup, as they don't have their own disks), I see:

  2021-04-06 14:31:24,084 - helpers.py[DEBUG]: Running config-growpart using lock (<cloudinit.helpers.DummyLock object at 0x7f11232ef490>)
  2021-04-06 14:31:24,084 - cc_growpart.py[DEBUG]: No 'growpart' entry in cfg.  Using default: {'mode': 'auto', 'devices': ['/'], 'ignore_growroot_disabled': False}
  2021-04-06 14:31:24,084 - subp.py[DEBUG]: Running command ['growpart', '--help'] with allowed return codes [0] (shell=False, capture=True)
  2021-04-06 14:31:24,092 - util.py[DEBUG]: Reading from /proc/503/mountinfo (quiet=False)
  2021-04-06 14:31:24,092 - util.py[DEBUG]: Read 3726 bytes from /proc/503/mountinfo
  2021-04-06 14:31:24,093 - subp.py[DEBUG]: Running command ['lvm', 'lvs', '/dev/sda1', '--options=vgname', '--noheadings'] with allowed return codes [0] (shell=False, capture=True)
  2021-04-06 14:31:24,138 - util.py[WARNING]: Failed: can't get Volume Group information from /dev/sda1
  2021-04-06 14:31:24,138 - util.py[DEBUG]: Failed: can't get Volume Group information from /dev/sda1
  Traceback (most recent call last):
    File "/usr/lib/python3/dist-packages/cloudinit/config/cc_growpart.py", line 125, in get_pvs_for_lv
      (out, _err) = subp.subp(["lvm", "lvs", devpath, "--options=vgname",
    File "/usr/lib/python3/dist-packages/cloudinit/subp.py", line 293, in subp
      raise ProcessExecutionError(stdout=out, stderr=err,
  cloudinit.subp.ProcessExecutionError: Unexpected error while running command.
  Command: ['lvm', 'lvs', '/dev/sda1', '--options=vgname', '--noheadings']
  Exit code: 5
  Reason: -
  Stdout: 
  Stderr:   Volume group "sda1" not found
            Cannot process volume group sda1
  2021-04-06 14:31:24,140 - util.py[DEBUG]: resize_devices took 0.048 seconds
  2021-04-06 14:31:24,140 - handlers.py[DEBUG]: finish: init-network/config-growpart: FAIL: running config-growpart with frequency always
  2021-04-06 14:31:24,140 - util.py[WARNING]: Running module growpart (<module 'cloudinit.config.cc_growpart' from '/usr/lib/python3/dist-packages/cloudinit/config/cc_growpart.py'>) failed
  2021-04-06 14:31:24,142 - util.py[DEBUG]: Running module growpart (<module 'cloudinit.config.cc_growpart' from '/usr/lib/python3/dist-packages/cloudinit/config/cc_growpart.py'>) failed
  Traceback (most recent call last):
    File "/usr/lib/python3/dist-packages/cloudinit/config/cc_growpart.py", line 125, in get_pvs_for_lv
      (out, _err) = subp.subp(["lvm", "lvs", devpath, "--options=vgname",
    File "/usr/lib/python3/dist-packages/cloudinit/subp.py", line 293, in subp
      raise ProcessExecutionError(stdout=out, stderr=err,
  cloudinit.subp.ProcessExecutionError: Unexpected error while running command.
  Command: ['lvm', 'lvs', '/dev/sda1', '--options=vgname', '--noheadings']
  Exit code: 5
  Reason: -
  Stdout: 
  Stderr:   Volume group "sda1" not found
            Cannot process volume group sda1

  The above exception was the direct cause of the following exception:

  Traceback (most recent call last):
    File "/usr/lib/python3/dist-packages/cloudinit/stages.py", line 884, in _run_modules
      ran, _r = cc.run(run_name, mod.handle, func_args,
    File "/usr/lib/python3/dist-packages/cloudinit/cloud.py", line 54, in run
      return self._runners.run(name, functor, args, freq, clear_on_fail)
    File "/usr/lib/python3/dist-packages/cloudinit/helpers.py", line 185, in run
      results = functor(*args)
    File "/usr/lib/python3/dist-packages/cloudinit/config/cc_growpart.py", line 434, in handle
      resized = util.log_time(logfunc=log.debug, msg="resize_devices",
    File "/usr/lib/python3/dist-packages/cloudinit/util.py", line 2348, in log_time
      ret = func(*args, **kwargs)
    File "/usr/lib/python3/dist-packages/cloudinit/config/cc_growpart.py", line 358, in resize_devices
      disk, ptnum = device_part_info(blockdev, is_lvm)
    File "/usr/lib/python3/dist-packages/cloudinit/config/cc_growpart.py", line 273, in device_part_info
      lvm_rpath = get_pvs_for_lv(devpath)
    File "/usr/lib/python3/dist-packages/cloudinit/config/cc_growpart.py", line 132, in get_pvs_for_lv
      raise ResizeFailedException(e) from e
  cloudinit.config.cc_growpart.ResizeFailedException: Unexpected error while running command.
  Command: ['lvm', 'lvs', '/dev/sda1', '--options=vgname', '--noheadings']
  Exit code: 5
  Reason: -
  Stdout: 
  Stderr:   Volume group "sda1" not found
            Cannot process volume group sda1

To manage notifications about this bug go to:
https://bugs.launchpad.net/cloud-init/+bug/1922742/+subscriptions


Follow ups