[node-patches] Change in ovirt-node[master]: Reinstall will now overpower major version mismatch

tlitovsk at redhat.com tlitovsk at redhat.com
Thu Nov 13 17:38:10 UTC 2014


Anatoly Litovsky has uploaded a new change for review.

Change subject: Reinstall will now overpower major version mismatch
......................................................................

Reinstall will now overpower major version mismatch

Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1162445
Change-Id: I435113d4dcf69121e1956acc653344d1b052edb9
Signed-off-by: Tolik Litovsky <tlitovsk at redhat.com>
---
M src/ovirt/node/installer/core/welcome_page.py
M src/ovirt/node/utils/system.py
2 files changed, 13 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-node refs/changes/43/35143/1

diff --git a/src/ovirt/node/installer/core/welcome_page.py b/src/ovirt/node/installer/core/welcome_page.py
index 0d439fc..f03d0ad 100644
--- a/src/ovirt/node/installer/core/welcome_page.py
+++ b/src/ovirt/node/installer/core/welcome_page.py
@@ -21,6 +21,7 @@
 from ovirt.node import plugins, ui, utils
 from ovirt.node.utils import virt, system
 import os
+from ovirt.node.utils.system import is_reinstall
 
 """
 Welcome page of the installer
@@ -92,9 +93,13 @@
         media = utils.system.InstallationMedia()
         installed = utils.system.InstalledMedia()
         is_installed = installed.available()
-        if is_installed and (media.version_major != installed.version_major):
-            block_upgrade = True
-        elif utils.system.has_hostvg():
+
+        #rhbz 1162445 on reinstall the version check is useless
+        if not is_reinstall():
+            if is_installed and (media.version_major != installed.version_major):
+                block_upgrade = True
+
+        if utils.system.has_hostvg():
             has_hostvg = True
             if os.path.exists("/dev/disk/by-label/ROOT"):
                 block_upgrade = True
diff --git a/src/ovirt/node/utils/system.py b/src/ovirt/node/utils/system.py
index 5955a8b..b8f03d0 100644
--- a/src/ovirt/node/utils/system.py
+++ b/src/ovirt/node/utils/system.py
@@ -126,6 +126,11 @@
     return any(arg in open("/proc/cmdline").read().split() for arg
                in ["rescue", "S", "single", "1"])
 
+def is_reinstall():
+    """is the system is in reinstalling mode
+    """
+    return any(arg in open("/proc/cmdline").read().split() for arg
+               in ["firstboot", "reinstall"])
 
 def node_version():
     """Return the version of the ovirt-node package


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I435113d4dcf69121e1956acc653344d1b052edb9
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-node
Gerrit-Branch: master
Gerrit-Owner: Anatoly Litovsky <tlitovsk at redhat.com>



More information about the node-patches mailing list