Skip to content

Commit 3ce217f

Browse files
Andrei ManolacheDany9966
authored andcommitted
Added a volume group directory check.
Added a volume group directory check. Set LOG as warning instead of info.
1 parent f45d982 commit 3ce217f

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

coriolis/osmorphing/osmount/base.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -567,6 +567,12 @@ def mount_os(self):
567567

568568
self._exec_cmd("sudo vgchange -ay -S vg_uuid=%s" % vg_uuid)
569569
self._exec_cmd("sudo vgchange --refresh")
570+
dev_vg_path = f"/dev/{vg_props['name']}"
571+
if not utils.test_ssh_path(self._ssh, dev_vg_path):
572+
LOG.warning(
573+
"Volume Group '%s' not found. Skipping.",
574+
dev_vg_path)
575+
continue
570576
dev_paths_for_group = self._exec_cmd(
571577
f"sudo ls -1 /dev/{vg_props['name']}/*").splitlines()
572578
lvm_dev_paths.extend(dev_paths_for_group)

0 commit comments

Comments
 (0)