[node-patches] Change in ovirt-node[master]: cli upgrades should use Install.ovirt_boot_setup

jboggs at redhat.com jboggs at redhat.com
Wed Nov 28 02:30:40 UTC 2012


Joey Boggs has uploaded a new change for review.

Change subject: cli upgrades should use Install.ovirt_boot_setup
......................................................................

cli upgrades should use Install.ovirt_boot_setup

rhbz#876076

Change-Id: I6fdca8672a149b3cf1cd9f22cd29e9667fb684ee
Signed-off-by: Joey Boggs <jboggs at redhat.com>
---
M scripts/ovirtnode/install.py
M scripts/ovirtnode/ovirtfunctions.py
2 files changed, 5 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-node refs/changes/26/9526/1

diff --git a/scripts/ovirtnode/install.py b/scripts/ovirtnode/install.py
index 9b1df29..2490704 100755
--- a/scripts/ovirtnode/install.py
+++ b/scripts/ovirtnode/install.py
@@ -262,6 +262,9 @@
                 grub_config_file = "/dev/.initramfs/live/grub/grub.conf"
             elif os.path.ismount("/run/initramfs/live"):
                 grub_config_file = "/run/initramfs/live/grub/grub.conf"
+            if is_upgrade():
+                mount_liveos()
+                grub_config_file = "/liveos/grub/grub.conf"
 
         if not grub_config_file is None:
             f=open(grub_config_file)
diff --git a/scripts/ovirtnode/ovirtfunctions.py b/scripts/ovirtnode/ovirtfunctions.py
index 4db7bf8..3a226e9 100644
--- a/scripts/ovirtnode/ovirtfunctions.py
+++ b/scripts/ovirtnode/ovirtfunctions.py
@@ -240,8 +240,8 @@
 
 # return 0 if this is an upgrade
 # return 1 otherwise
-def is_upgrade(self):
-    if self.OVIRT_VARS.has_key("OVIRT_UPGRADE") and self.OVIRT_VARS["OVIRT_UPGRADE"] == 1:
+def is_upgrade():
+    if OVIRT_VARS.has_key("OVIRT_UPGRADE") and OVIRT_VARS["OVIRT_UPGRADE"] == "1":
         return True
     else:
         return False


--
To view, visit http://gerrit.ovirt.org/9526
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6fdca8672a149b3cf1cd9f22cd29e9667fb684ee
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-node
Gerrit-Branch: master
Gerrit-Owner: Joey Boggs <jboggs at redhat.com>



More information about the node-patches mailing list