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

fabiand at redhat.com fabiand at redhat.com
Fri Oct 10 14:35:59 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/05/34005/1

diff --git a/src/ovirtnode/install.py b/src/ovirtnode/install.py
index a6cf6e7..51e861d 100755
--- a/src/ovirtnode/install.py
+++ b/src/ovirtnode/install.py
@@ -427,13 +427,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:
@@ -449,8 +451,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 dac86a4..be828a3 100644
--- a/src/ovirtnode/ovirtfunctions.py
+++ b/src/ovirtnode/ovirtfunctions.py
@@ -1528,6 +1528,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/34005
To unsubscribe, visit http://gerrit.ovirt.org/settings

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



More information about the node-patches mailing list