[node-patches] Change in ovirt-node[master]: installer: Fallback to -part* partitions
fabiand at redhat.com
fabiand at redhat.com
Wed Jan 7 17:01:22 UTC 2015
Fabian Deutsch has uploaded a new change for review.
Change subject: installer: Fallback to -part* partitions
......................................................................
installer: Fallback to -part* partitions
The /dev/disk/by* namespace uses the -part suffix for partitions. If a
device is addressed by this namespace, then we also need to try that
partition suffix.
Change-Id: Ie09125363dce9d15ff184b4ff2f246dfec98f5a9
Signed-off-by: Fabian Deutsch <fabiand at fedoraproject.org>
---
M src/ovirtnode/storage.py
1 file changed, 12 insertions(+), 0 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/ovirt-node refs/changes/51/36651/1
diff --git a/src/ovirtnode/storage.py b/src/ovirtnode/storage.py
index 0ed9500..fca7383 100644
--- a/src/ovirtnode/storage.py
+++ b/src/ovirtnode/storage.py
@@ -585,6 +585,8 @@
partefi = disk + "1"
if not os.path.exists(partefi):
partefi = disk + "p1"
+ if not os.path.exists(partefi):
+ partefi = disk + "-part1"
_functions.system("ln -snf \"" + partefi + \
"\" /dev/disk/by-label/EFI")
_functions.system("mkfs.vfat \"" + partefi + "\"")
@@ -619,6 +621,9 @@
if not os.path.exists(partroot):
partroot = self.ISCSIDRIVE + "p1"
partrootbackup = self.ISCSIDRIVE + "p2"
+ if not os.path.exists(partroot):
+ partroot = self.ISCSIDRIVE + "-part1"
+ partrootbackup = self.ISCSIDRIVE + "-part2"
_functions.system("ln -snf \"" + partroot + \
"\" /dev/disk/by-label/Root")
_functions.system("mke2fs \"" + partroot + "\" -L Root")
@@ -816,6 +821,10 @@
logger.debug("%s does not exist" % partboot)
partboot = self.BOOTDRIVE + "p2"
partbootbackup = self.BOOTDRIVE + "p3"
+ if not os.path.exists(partboot):
+ logger.debug("%s does not exist" % partboot)
+ partboot = self.BOOTDRIVE + "-part2"
+ partbootbackup = self.BOOTDRIVE + "-part3"
# sleep to ensure filesystems are created before continuing
_functions.system("udevadm settle")
@@ -885,6 +894,9 @@
if not os.path.exists(partroot):
partroot = self.ROOTDRIVE + "p2"
partrootbackup = self.ROOTDRIVE + "p3"
+ if not os.path.exists(partroot):
+ partroot = self.ROOTDRIVE + "-part2"
+ partrootbackup = self.ROOTDRIVE + "-part3"
_functions.system("umount -l " + partroot)
_functions.system("mke2fs \"" + partroot + "\" -L Root")
_functions.system("tune2fs -c 0 -i 0 \"" + partroot + "\"")
--
To view, visit http://gerrit.ovirt.org/36651
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie09125363dce9d15ff184b4ff2f246dfec98f5a9
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-node
Gerrit-Branch: master
Gerrit-Owner: Fabian Deutsch <fabiand at redhat.com>
More information about the node-patches
mailing list