[node-patches] Change in ovirt-node[master]: fix o-n-upgrade path failures

jboggs at redhat.com jboggs at redhat.com
Mon May 20 22:20:31 UTC 2013


Joey Boggs has uploaded a new change for review.

Change subject: fix o-n-upgrade path failures
......................................................................

fix o-n-upgrade path failures

Signed-off-by: Joey Boggs <jboggs at redhat.com>
Change-Id: Ibdee19390fe1561e68674b54cf3ff216e1f09034
---
M scripts/ovirt-node-upgrade.py
M src/ovirtnode/install.py
2 files changed, 10 insertions(+), 7 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-node refs/changes/10/14910/1

diff --git a/scripts/ovirt-node-upgrade.py b/scripts/ovirt-node-upgrade.py
index e172cf9..55fc14f 100755
--- a/scripts/ovirt-node-upgrade.py
+++ b/scripts/ovirt-node-upgrade.py
@@ -142,13 +142,13 @@
         ))
 
         for path in hooks_path:
-            if not os.path.exists(hooks_path):
-                self._logger.info("Warning: {hooks_path} does not exist".format
-                                 (hooks_path=hooks_path))
+            if not os.path.exists(path):
+                self._logger.info("Warning: {path} does not exist".format
+                                 (path=path))
             else:
                 self._logger.info("Running {stage} hooks".format(stage=stage))
-                for i in sorted(os.listdir(hooks_path)):
-                    hook = os.path.join(hooks_path, i)
+                for i in sorted(os.listdir(path)):
+                    hook = os.path.join(path, i)
                     self._logger.info("Running: {hook}".format(hook=i))
                     self._system(hook)
                 self._logger.info(
diff --git a/src/ovirtnode/install.py b/src/ovirtnode/install.py
index d78ba1b..ec3c4b1 100755
--- a/src/ovirtnode/install.py
+++ b/src/ovirtnode/install.py
@@ -292,10 +292,13 @@
             if _functions.findfs("Boot"):
                 grub_config_file = "/boot/grub/grub.conf"
             elif os.path.ismount("/dev/.initramfs/live"):
-                grub_config_file = "/dev/.initramfs/live/grub/grub.conf"
+                if not _functions.grub2_available():
+                    grub_config_file = "/dev/.initramfs/live/grub/grub.conf"
+                else:
+                    grub_config_file = "/dev/.initramfs/live/grub2/grub.cfg"
             elif os.path.ismount("/run/initramfs/live"):
                 grub_config_file = "/run/initramfs/live/grub/grub.conf"
-            if is_upgrade() and not _functions.is_iscsi_install():
+            if _functions.is_upgrade() and not _functions.is_iscsi_install():
                 mount_liveos()
                 grub_config_file = "/liveos/grub/grub.conf"
         if _functions.is_efi_boot():


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibdee19390fe1561e68674b54cf3ff216e1f09034
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