[node-patches] Change in ovirt-node[master]: storage: Check for remaining HostVG
fabiand at fedoraproject.org
fabiand at fedoraproject.org
Thu Nov 15 16:01:49 UTC 2012
Fabian Deutsch has uploaded a new change for review.
Change subject: storage: Check for remaining HostVG
......................................................................
storage: Check for remaining HostVG
Previously it was assumed that no HostVG existed after all the wiping
was done, but this could be the case when the PV was on a disk which was
not wiped.
Now a message is added to the logs which points at the cause for this
problem and the installation is aborted.
rhbz#872114
Change-Id: Ia9eea77f867adfd601d1dd1d3fcf46d6b07e5414
Signed-off-by: Fabian Deutsch <fabiand at fedoraproject.org>
---
M scripts/ovirtnode/storage.py
1 file changed, 14 insertions(+), 0 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/ovirt-node refs/changes/70/9270/1
diff --git a/scripts/ovirtnode/storage.py b/scripts/ovirtnode/storage.py
index 7145b8e..c8f30f3 100644
--- a/scripts/ovirtnode/storage.py
+++ b/scripts/ovirtnode/storage.py
@@ -676,6 +676,20 @@
logger.debug("Old LVM partitions should be gone.")
logger.debug(_functions.passthrough("vgdisplay -v"))
+ # Check for still remaining HostVGs this can be the case when
+ # Node was installed on a disk not given in storage_init
+ # rhbz#872114
+ existing_vgs = _functions.passthrough("vgdisplay --noheadings"):
+ for vg in existing_vgs.split("\n"):
+ vg = vg.strip()
+ print vg
+ if vg.startswith("HostVG"):
+ logger.error("An existing installation was found or not " +
+ "all VGs could be removed. " +
+ "Please manually cleanup the storage using " +
+ "standard disk tools.")
+ return False
+
self.boot_size_si = self.BOOT_SIZE * (1024 * 1024) / (1000 * 1000)
if _functions.is_iscsi_install():
# login to target and setup disk"
--
To view, visit http://gerrit.ovirt.org/9270
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia9eea77f867adfd601d1dd1d3fcf46d6b07e5414
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-node
Gerrit-Branch: master
Gerrit-Owner: Fabian Deutsch <fabiand at fedoraproject.org>
More information about the node-patches
mailing list