[node-patches] Change in ovirt-node[node-3.0]: installer: Be more conservative with partprobe

fabiand at redhat.com fabiand at redhat.com
Wed Jan 28 15:11:07 UTC 2015


Fabian Deutsch has uploaded a new change for review.

Change subject: installer: Be more conservative with partprobe
......................................................................

installer: Be more conservative with partprobe

Previously partprobe was called in many places to update the partition
device links.
The initial cause for the missing device links were problems with udev
and multipath.
Now that these bugs have been addressed, the partprobe usage is known to
be buggy when layered dm devices exist or something is mounted. Thus we
remove the partprobe usage to reduce the probability for problems caused
by an excessive use.

Change-Id: I713e83009e6c623078ef30ffdbd0a620515cf8de
BNug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1167240
Signed-off-by: Fabian Deutsch <fabiand at fedoraproject.org>
---
M scripts/ovirt-functions.in
M src/ovirt/node/utils/system.py
M src/ovirtnode/install.py
M src/ovirtnode/ovirtfunctions.py
4 files changed, 0 insertions(+), 11 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-node refs/changes/76/37376/1

diff --git a/scripts/ovirt-functions.in b/scripts/ovirt-functions.in
index 046981b..83eef8c 100644
--- a/scripts/ovirt-functions.in
+++ b/scripts/ovirt-functions.in
@@ -844,7 +844,6 @@
 }
 
 findfs() {
-    partprobe /dev/mapper/* 2>/dev/null
     udevadm settle
     /sbin/blkid -c /dev/null -l -o device -t "$@"
 }
diff --git a/src/ovirt/node/utils/system.py b/src/ovirt/node/utils/system.py
index 60832f4..81eb544 100644
--- a/src/ovirt/node/utils/system.py
+++ b/src/ovirt/node/utils/system.py
@@ -607,9 +607,6 @@
         """
         # Don't litter the screen with output, so get a handle to /dev/null
         with open(os.devnull, 'wb') as DEVNULL:
-            process.call(["partprobe"] + [x for x in glob.glob("/dev/mapper/*")
-                                          if not re.match(r'.*\/control$', x)],
-                         stdout=DEVNULL, stderr=DEVNULL)
             process.call(["udevadm", "settle"], stdout=DEVNULL, stderr=DEVNULL)
 
     @staticmethod
diff --git a/src/ovirtnode/install.py b/src/ovirtnode/install.py
index f86664d..1688591 100755
--- a/src/ovirtnode/install.py
+++ b/src/ovirtnode/install.py
@@ -372,7 +372,6 @@
             boot_candidate_names = ["BootBackup", "BootUpdate", "BootNew"]
             for trial in range(1, 3):
                 time.sleep(1)
-                _functions.system("partprobe")
                 for candidate_name in boot_candidate_names:
                     logger.debug(os.listdir("/dev/disk/by-label"))
                     if _functions.findfs(candidate_name):
@@ -412,7 +411,6 @@
         candidate_names = ["RootBackup", "RootUpdate", "RootNew"]
         for trial in range(1, 3):
             time.sleep(1)
-            _functions.system("partprobe")
             for candidate_name in candidate_names:
                 candidate_dev = _functions.findfs(candidate_name)
                 logger.debug("Finding %s: '%s'" % (candidate_name, candidate_dev))
@@ -550,9 +548,6 @@
             sysfs = open("/proc/sys/vm/drop_caches", "w")
             sysfs.write("3")
             sysfs.close()
-            partprobe_cmd = "partprobe \"/dev/%s\"" % self.disk
-            logger.debug(partprobe_cmd)
-            _functions.system(partprobe_cmd)
 
         if not self.disk.startswith("/dev/"):
             self.disk = "/dev/" + self.disk
diff --git a/src/ovirtnode/ovirtfunctions.py b/src/ovirtnode/ovirtfunctions.py
index f9e0959..0356d48 100644
--- a/src/ovirtnode/ovirtfunctions.py
+++ b/src/ovirtnode/ovirtfunctions.py
@@ -1546,8 +1546,6 @@
     return False
 
 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/37376
To unsubscribe, visit http://gerrit.ovirt.org/settings

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