Ryan Barry has uploaded a new change for review. Change subject: Save changed bootloader arguments on upgrades ......................................................................
Save changed bootloader arguments on upgrades Added driver options, console paths, and other settings should stick across upgrades. Change-Id: I3803fb5df6273034fe1d9e9b1d98b0a67756c5d2 Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1128039 Signed-off-by: Ryan Barry <[email protected]> --- M src/ovirtnode/install.py 1 file changed, 15 insertions(+), 0 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-node refs/changes/09/33509/1 diff --git a/src/ovirtnode/install.py b/src/ovirtnode/install.py index a6cf6e7..32bb988 100755 --- a/src/ovirtnode/install.py +++ b/src/ovirtnode/install.py @@ -367,6 +367,7 @@ logger.debug("Grub config file is: %s" % grub_config_file) logger.debug("Grub config file exists: %s" % grub_config_file_exists) if not grub_config_file is None and os.path.exists(grub_config_file): + shutil.copy(grub_config_file, "/tmp/grub_conf") f=open(grub_config_file) oldgrub=f.read() f.close() @@ -551,6 +552,20 @@ ).replace( "rd_NO_MULTIPATH", "") + + if os.path.isfile("/tmp/grub_conf"): + from ovirt.node.utils.system import Bootloader + staged = Bootloader().Arguments(dry=True).dry_arguments( + self.bootparams) + saved = Bootloader().Arguments(path="/tmp/grub.conf") + + for arg in saved.keys(): + if arg not in staged: + if saved[arg] is not True: + self.bootparams += "%s=%s " % (arg, saved[arg]) + else: + self.bootparams += "%s " % arg + if " " in self.disk or os.path.exists("/dev/cciss"): # workaround for grub setup failing with spaces in dev.name: # use first active sd* device -- To view, visit http://gerrit.ovirt.org/33509 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3803fb5df6273034fe1d9e9b1d98b0a67756c5d2 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-node Gerrit-Branch: master Gerrit-Owner: Ryan Barry <[email protected]> _______________________________________________ node-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/node-patches
