Blame SOURCES/LVM-volume_group_check_only.patch

05afe3
From c414259728610f95243d9e34289fefd596b0ac8b Mon Sep 17 00:00:00 2001
05afe3
From: Oyvind Albrigtsen <oalbrigt@redhat.com>
05afe3
Date: Fri, 22 Jun 2018 15:37:36 +0200
05afe3
Subject: [PATCH] LVM: add "volume_group_check_only" parameter to avoid
05afe3
 timeouts in some cases
05afe3
05afe3
---
05afe3
 heartbeat/LVM        | 10 ++++++++++
05afe3
 heartbeat/lvm-tag.sh | 24 +++++++++++++-----------
05afe3
 2 files changed, 23 insertions(+), 11 deletions(-)
05afe3
05afe3
diff --git a/heartbeat/LVM b/heartbeat/LVM
05afe3
index d3cd1a14..10f7186d 100755
05afe3
--- a/heartbeat/LVM
05afe3
+++ b/heartbeat/LVM
05afe3
@@ -103,6 +103,16 @@ logical volumes.
05afe3
 <content type="string" default="false" />
05afe3
 </parameter>
05afe3
 
05afe3
+<parameter name="volume_group_check_only" unique="0" required="0">
05afe3
+<longdesc lang="en">
05afe3
+If set, only the volume group will be checked during monitoring.
05afe3
+
05afe3
+WARNING: ONLY USE IF YOU HAVE ISSUES WITH TIMEOUTS!
05afe3
+</longdesc>
05afe3
+<shortdesc lang="en">Only check volume group during monitoring</shortdesc>
05afe3
+<content type="string" default="false" />
05afe3
+</parameter>
05afe3
+
05afe3
 </parameters>
05afe3
 
05afe3
 <actions>
05afe3
diff --git a/heartbeat/lvm-tag.sh b/heartbeat/lvm-tag.sh
05afe3
index 71f53b20..170426e8 100644
05afe3
--- a/heartbeat/lvm-tag.sh
05afe3
+++ b/heartbeat/lvm-tag.sh
05afe3
@@ -160,19 +160,21 @@ lvm_validate_all() {
05afe3
 lvm_status() {
05afe3
 	local rc=0
05afe3
 
05afe3
-	# If vg is running, make sure the correct tag is present. Otherwise we
05afe3
-	# can not guarantee exclusive activation.
05afe3
-	if ! check_tags; then
05afe3
-		ocf_exit_reason "WARNING: $OCF_RESKEY_volgrpname is active without the cluster tag, \"$OUR_TAG\""
05afe3
-		rc=$OCF_ERR_GENERIC
05afe3
-	fi
05afe3
+	if ! ocf_is_true "$OCF_RESKEY_volume_group_check_only"; then
05afe3
+		# If vg is running, make sure the correct tag is present. Otherwise we
05afe3
+		# can not guarantee exclusive activation.
05afe3
+		if ! check_tags; then
05afe3
+			ocf_exit_reason "WARNING: $OCF_RESKEY_volgrpname is active without the cluster tag, \"$OUR_TAG\""
05afe3
+			rc=$OCF_ERR_GENERIC
05afe3
+		fi
05afe3
 
05afe3
-	# make sure the environment for tags activation is still valid
05afe3
-	if ! verify_tags_environment; then
05afe3
-		rc=$OCF_ERR_GENERIC
05afe3
+		# make sure the environment for tags activation is still valid
05afe3
+		if ! verify_tags_environment; then
05afe3
+			rc=$OCF_ERR_GENERIC
05afe3
+		fi
05afe3
+		# let the user know if their initrd is older than lvm.conf.
05afe3
+		check_initrd_warning
05afe3
 	fi
05afe3
-	# let the user know if their initrd is older than lvm.conf.
05afe3
-	check_initrd_warning
05afe3
 
05afe3
 	return $rc
05afe3
 }
05afe3
-- 
05afe3
2.17.1
05afe3