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

fabiand at redhat.com fabiand at redhat.com
Tue Dec 16 10:56:18 UTC 2014


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/01/36201/1

diff --git a/scripts/ovirt-functions.in b/scripts/ovirt-functions.in
index 717bc71..b3882ee 100644
--- a/scripts/ovirt-functions.in
+++ b/scripts/ovirt-functions.in
@@ -855,7 +855,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 3a6f2bf..5e45536 100644
--- a/src/ovirt/node/utils/system.py
+++ b/src/ovirt/node/utils/system.py
@@ -849,9 +849,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 1657f6c..b71602a 100755
--- a/src/ovirtnode/install.py
+++ b/src/ovirtnode/install.py
@@ -386,7 +386,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):
@@ -426,7 +425,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))
@@ -584,9 +582,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 f09955a..8ab7b12 100644
--- a/src/ovirtnode/ovirtfunctions.py
+++ b/src/ovirtnode/ovirtfunctions.py
@@ -1542,8 +1542,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/36201
To unsubscribe, visit http://gerrit.ovirt.org/settings

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