Change in vdsm[ovirt-3.5]: spec: Create default multipath.conf during install

nsoffer at redhat.com nsoffer at redhat.com
Sun Aug 3 23:08:30 UTC 2014


Hello Federico Simoncelli, Dan Kenigsberg,

I'd like you to do a code review.  Please visit

    http://gerrit.ovirt.org/30982

to review the following change.

Change subject: spec: Create default multipath.conf during install
......................................................................

spec: Create default multipath.conf during install

/etc/multipath.conf does not exits after multipath is installed. This
causes multipathd to fail silently when started as vdsmd rquired
service. Later, when vdsm install new configuration and try to reload
multipathd, it fails and panics.

Example multipathd start on RHEL 7:

    [root at reserved-0-247 ~]# systemctl start multipathd
    [root at reserved-0-247 ~]# systemctl status multipathd
    multipathd.service - Device-Mapper Multipath Device Controller
       Loaded: loaded (/usr/lib/systemd/system/multipathd.service; enabled)
       Active: inactive (dead) since Fri 2014-07-25 13:55:48 IDT; 14min ago
               start condition failed at Fri 2014-07-25 14:10:04 IDT; 2s ago
               ConditionPathExists=/etc/multipath.conf was not met

On EL6, multipathd run when configuration is not available, blacklisting
all devices. It log this message to /var/log/message in this case:

    Jul 25 15:25:28 dhcp-1-210 multipathd: /etc/multipath.conf does not
    exist, blacklisting all devices.

This patch uses mpathconf to create a default multipath.conf if the file
does not exists during installation. This configuration blacklist all
devices, simulating the behavior of multipathd on EL6.

Change-Id: I607b4bbf3451612c25bf3da9640b2410314195c1
Bug-Url: https://bugzilla.redhat.com/1120209
Signed-off-by: Nir Soffer <nsoffer at redhat.com>
Reviewed-on: http://gerrit.ovirt.org/30704
Reviewed-by: Federico Simoncelli <fsimonce at redhat.com>
Reviewed-by: Dan Kenigsberg <danken at redhat.com>
---
M vdsm.spec.in
1 file changed, 8 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/82/30982/1

diff --git a/vdsm.spec.in b/vdsm.spec.in
index 1636148..a174a00 100644
--- a/vdsm.spec.in
+++ b/vdsm.spec.in
@@ -732,6 +732,14 @@
     /sbin/chkconfig --add supervdsmd
 fi
 %else
+# multipath.conf does not exists after multipath install, causing multipathd to
+# exit silently when started as vdsmd required service.  This creates default
+# configuration blacklisting all devices, simulating the behavior of multipathd
+# on EL6 when configuration file is missing.
+# See https://bugzilla.redhat.com/1120209
+if [ ! -f "/etc/multipath.conf" ]; then
+    /usr/sbin/mpathconf --disable
+fi
 /bin/systemctl restart systemd-modules-load.service >/dev/null 2>&1 || :
 if [ "$1" -eq 1 ] ; then
     /bin/systemctl enable vdsmd.service >/dev/null 2>&1 || :


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I607b4bbf3451612c25bf3da9640b2410314195c1
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: ovirt-3.5
Gerrit-Owner: Nir Soffer <nsoffer at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Federico Simoncelli <fsimonce at redhat.com>


More information about the vdsm-patches mailing list