[node-patches] Change in ovirt-node[node-3.0]: install: Partition probing ain't reliable

fabiand at redhat.com fabiand at redhat.com
Fri Oct 24 09:32:37 UTC 2014


Fabian Deutsch has uploaded a new change for review.

Change subject: install: Partition probing ain't reliable
......................................................................

install: Partition probing ain't reliable

It seems that the partition probing during the installation wasn't
reliable, an extra call was added to flush all partition informations.

Change-Id: If889041a917112a06534595ba486ad473c6b7f4a
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1150377
Signed-off-by: Fabian Deutsch <fabiand at fedoraproject.org>
---
M src/ovirtnode/install.py
M src/ovirtnode/ovirtfunctions.py
2 files changed, 6 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-node refs/changes/39/34439/1

diff --git a/src/ovirtnode/install.py b/src/ovirtnode/install.py
index 042e6bb..a52d3b6 100755
--- a/src/ovirtnode/install.py
+++ b/src/ovirtnode/install.py
@@ -413,13 +413,15 @@
             time.sleep(1)
             _functions.system("partprobe")
             for candidate_name in candidate_names:
+                logger.debug("Finding %s: '%s'" % (candidate_name, _functions.findfs(candidate_name)))
                 if _functions.findfs(candidate_name):
                     candidate = candidate_name
+                    logger.debug("Found: %s" % candidate)
                     break
             logger.debug("Trial %s to find candidate (%s)" % (trial,
                                                               candidate_name))
             if candidate:
-                logger.debug("Found candidate: %s" % candidate)
+                logger.debug("Found candidate: '%s'" % candidate)
                 break
 
         if not candidate:
@@ -435,8 +437,8 @@
 
         try:
             candidate_dev = self.disk = _functions.findfs(candidate)
-            logger.info(candidate_dev)
-            logger.info(self.disk)
+            logger.info("Candidate device: %s" % candidate_dev)
+            logger.info("Candidate disk: %s" % self.disk)
             # grub2 starts at part 1
             self.partN = int(self.disk[-1:])
             if not _functions.grub2_available():
diff --git a/src/ovirtnode/ovirtfunctions.py b/src/ovirtnode/ovirtfunctions.py
index 8dc9557..bed45ca 100644
--- a/src/ovirtnode/ovirtfunctions.py
+++ b/src/ovirtnode/ovirtfunctions.py
@@ -1532,6 +1532,7 @@
 
 def findfs(label):
     system("partprobe /dev/mapper/*")
+    system("partprobe")
     system("udevadm settle")
     blkid_cmd = "/sbin/blkid -c /dev/null -l -o device -t LABEL=\"" + label + "\""
     blkid = subprocess_closefds(blkid_cmd, shell=True, stdout=PIPE, stderr=STDOUT)


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If889041a917112a06534595ba486ad473c6b7f4a
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-node
Gerrit-Branch: node-3.0
Gerrit-Owner: Fabian Deutsch <fabiand at redhat.com>



More information about the node-patches mailing list