[node-patches] Change in ovirt-node[ovirt-3.5]: recipe: More robust multipath configuration
fabiand at redhat.com
fabiand at redhat.com
Wed Dec 17 16:10:01 UTC 2014
Fabian Deutsch has uploaded a new change for review.
Change subject: recipe: More robust multipath configuration
......................................................................
recipe: More robust multipath configuration
Previously some multipath configuration snippet got appended to the
existing configuration file.
This could lead to a situation where the defaults section appeared
twice, this made the configuration invalid, and multipath would not work
at all.
Now a different approach is used to ensure that a vlid configuration is
written.
Change-Id: I1e878b8cd2ce4b456380300dca2fa51c92523547
Signed-off-by: Fabian Deutsch <fabiand at fedoraproject.org>
---
M recipe/common-post.ks
M recipe/rhevh6-post.ks
M recipe/rhevh7-post.ks
3 files changed, 11 insertions(+), 19 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/ovirt-node refs/changes/55/36255/1
diff --git a/recipe/common-post.ks b/recipe/common-post.ks
index af16ff7..f07b940 100644
--- a/recipe/common-post.ks
+++ b/recipe/common-post.ks
@@ -295,3 +295,14 @@
# https://bugzilla.redhat.com/show_bug.cgi?id=1168582
rm -vf /usr/lib64/python2.*/site-packages/backports/*
+
+# https://bugzilla.redhat.com/show_bug.cgi?id=1167620
+# Ensure that mpath is enabled and find_multipaths is y
+mpathconf --enable --find_multipaths y
+# Then ensure that getuid_callout is set for b/c
+sed -i \
+ -e "/find_multipaths / a getuid_callout \"/lib/udev/scsi_id --replace-whitespace --whitelisted --device=/dev/%n\"" \
+ -e "/^#/ d" \
+ -e "/user_friendly_names/ d" \
+ /etc/multipath.conf
+
diff --git a/recipe/rhevh6-post.ks b/recipe/rhevh6-post.ks
index 8655a59..72a8d40 100644
--- a/recipe/rhevh6-post.ks
+++ b/recipe/rhevh6-post.ks
@@ -239,13 +239,3 @@
+ENV{DM_ACTIVATION}=="1", RUN+="$env{MPATH_SBIN_PATH}/kpartx -a -p p $tempnode"
LABEL="end_mpath"
EOF_udev_patch
-
-
-# https://bugzilla.redhat.com/show_bug.cgi?id=1167620
-cat << \EOF_mpath >> /etc/multipath.conf
-
-defaults {
- find_multipaths yes
- getuid_callout "/lib/udev/scsi_id --replace-whitespace --whitelisted --device=/dev/%n"
-}
-EOF_mpath
diff --git a/recipe/rhevh7-post.ks b/recipe/rhevh7-post.ks
index 238ea3f..70e6cf0 100644
--- a/recipe/rhevh7-post.ks
+++ b/recipe/rhevh7-post.ks
@@ -234,12 +234,3 @@
wait_for_dev -n "${root#live:}"
;;
EOF_dracut
-
-# https://bugzilla.redhat.com/show_bug.cgi?id=1167620
-cat << \EOF_mpath >> /etc/multipath.conf
-
-defaults {
- find_multipaths yes
-}
-EOF_mpath
-
--
To view, visit http://gerrit.ovirt.org/36255
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I1e878b8cd2ce4b456380300dca2fa51c92523547
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-node
Gerrit-Branch: ovirt-3.5
Gerrit-Owner: Fabian Deutsch <fabiand at redhat.com>
Gerrit-Reviewer: Fabian Deutsch <fabiand at redhat.com>
More information about the node-patches
mailing list