Support RHEL 7 multipath configuration changes
authorMartin Schwenke <martin@meltin.net>
Thu, 19 Jun 2014 02:09:42 +0000 (12:09 +1000)
committerMartin Schwenke <martin@meltin.net>
Wed, 25 Jun 2014 10:46:16 +0000 (20:46 +1000)
getuid_callout and udev_dir are no longer supported so don't use them.
If serial numbers work with the shared disks then it will just work.

Signed-off-by: Martin Schwenke <martin@meltin.net>
base/all/etc/multipath.conf
config.d/00base.defconf

index 4f8a98f2b4b9556a817024a2e37d8db2d7a262b1..5f5bc32a3c0e23a76e9326f325d876e76237b3ac 100644 (file)
@@ -1,6 +1,5 @@
 defaults {
- udev_dir                /dev
- getuid_callout          "@@SHARED_DISK_MULTIPATH_CALLOUT@@"
+@@RHEL_MULTIPATH_MAGIC@@
  user_friendly_names     yes
 }
 
index f0450739e5ace3a0ca43b21722dcf9106fda0a0f..fc4f71e0e8307e3f9dd76034ab33b11bdc2430b2 100644 (file)
@@ -451,6 +451,16 @@ EOF
     fi
 }
 
+rhel_get_multipath_magic ()
+{
+    if [ ${RHEL_VERSION%%.*} -le 6 ] ; then
+       cat <<EOF
+ udev_dir                /dev
+ getuid_callout          "$SHARED_DISK_MULTIPATH_CALLOUT"
+EOF
+    fi
+}
+
 rhel_post_config_hook ()
 {
     if [ "$ISO" = "@uto" ] ; then
@@ -488,6 +498,10 @@ rhel_post_config_hook ()
     if [ "$INSTALL_KS_DEVICE_TEMPLATE" = "@uto" ] ; then
        INSTALL_KS_DEVICE_TEMPLATE=$(rhel_get_install_ks_device_xml) || exit $?
     fi
+
+    if [ "$RHEL_MULTIPATH_MAGIC" = "@uto" ] ; then
+       RHEL_MULTIPATH_MAGIC=$(rhel_get_multipath_magic) || exit $?
+    fi
 }
 
 register_hook post_config_hooks rhel_post_config_hook
@@ -502,6 +516,8 @@ defconf RHEL_PACKAGES "@uto"
 
 defconf RHEL_SERVICES "@uto"
 
+defconf RHEL_MULTIPATH_MAGIC "@uto"
+
 defconf ISO_DIR "/virtual/ISO" \
        "<dir>" "directory for ISO images, prepended to $ISO if not absolute"