[node-patches] Change in ovirt-node[master]: Move initramfs regeneration until after grub is installed
rbarry at redhat.com
rbarry at redhat.com
Thu Sep 10 20:13:40 UTC 2015
Ryan Barry has uploaded a new change for review.
Change subject: Move initramfs regeneration until after grub is installed
......................................................................
Move initramfs regeneration until after grub is installed
It needs to happen after the grub install, or grub2-install
gets very confused about what disk it's going to boot from.
This is because updating the initramfs also umounts /liveos
and /boot
Also, revert the changes to mount_liveos, which has too many
interactions with ovirt-functions.sh and other parts of the
system to change without side effects
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1260548
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1260551
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1260559
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1259220
Change-Id: Id8df5dd1ca6e3ab6be01d45958e2ef48b119c241
Signed-off-by: Ryan Barry <rbarry at redhat.com>
---
M src/ovirtnode/install.py
M src/ovirtnode/ovirtfunctions.py
2 files changed, 12 insertions(+), 11 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/ovirt-node refs/changes/43/46043/1
diff --git a/src/ovirtnode/install.py b/src/ovirtnode/install.py
index c2b808f..d59b3a8 100755
--- a/src/ovirtnode/install.py
+++ b/src/ovirtnode/install.py
@@ -594,9 +594,6 @@
"rd_NO_MULTIPATH",
"")
- # Update initramfs to pickup multipath wwids
- _system.Initramfs().rebuild()
-
if " " in self.disk:
# workaround for grub setup failing with spaces in dev.name:
# use first active sd* device
@@ -678,6 +675,9 @@
else:
logger.info("Grub Installation Completed")
+ # Update initramfs to pickup multipath wwids
+ _system.Initramfs().rebuild()
+
if _functions.is_iscsi_install() or _functions.findfs("BootNew"):
# copy default for when Root/HostVG is inaccessible(iscsi upgrade)
shutil.copy(_functions.OVIRT_DEFAULTS, "/boot")
diff --git a/src/ovirtnode/ovirtfunctions.py b/src/ovirtnode/ovirtfunctions.py
index aec1577..d152bc1 100644
--- a/src/ovirtnode/ovirtfunctions.py
+++ b/src/ovirtnode/ovirtfunctions.py
@@ -530,14 +530,15 @@
system("ln -s \"/dev/mapper/" + dev + "\" /dev/disk/by-label/Root")
if system("mount LABEL=Root /liveos"):
return True
- if os.path.ismount("/dev/.initramfs/live"):
- if system_closefds("mount -o bind /dev/.initramfs/live /liveos"):
- return True
- elif os.path.ismount("/run/initramfs/live"):
- if system_closefds("mount -o bind /run/initramfs/live /liveos"):
- return True
-
- return False
+ else:
+ if os.path.ismount("/dev/.initramfs/live"):
+ system_closefds("mount -o bind /dev/.initramfs/live /liveos")
+ elif os.path.ismount("/run/initramfs/live"):
+ system_closefds("mount -o bind /run/initramfs/live /liveos")
+ else:
+ return False
+ else:
+ return True
def mount_efi(target="/liveos/efi"):
# Moved to the new codebase
--
To view, visit https://gerrit.ovirt.org/46043
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Id8df5dd1ca6e3ab6be01d45958e2ef48b119c241
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-node
Gerrit-Branch: master
Gerrit-Owner: Ryan Barry <rbarry at redhat.com>
More information about the node-patches
mailing list