Blame SOURCES/bz1658664-LVM-activate-dont-require-locking_type.patch

b4b3ce
From 4f122cd0cf46c1fdc1badb22049607a6abf0c885 Mon Sep 17 00:00:00 2001
b4b3ce
From: Oyvind Albrigtsen <oalbrigt@redhat.com>
b4b3ce
Date: Mon, 4 Feb 2019 17:04:59 +0100
b4b3ce
Subject: [PATCH] LVM-activate: only check locking_type when LVM < v2.03
b4b3ce
b4b3ce
---
b4b3ce
 heartbeat/LVM-activate | 7 ++++++-
b4b3ce
 1 file changed, 6 insertions(+), 1 deletion(-)
b4b3ce
b4b3ce
diff --git a/heartbeat/LVM-activate b/heartbeat/LVM-activate
b4b3ce
index c2239d881..3c462c75c 100755
b4b3ce
--- a/heartbeat/LVM-activate
b4b3ce
+++ b/heartbeat/LVM-activate
b4b3ce
@@ -311,7 +311,12 @@ config_verify()
b4b3ce
 lvmlockd_check()
b4b3ce
 {
b4b3ce
 	config_verify "global/use_lvmlockd" "1"
b4b3ce
-	config_verify "global/locking_type" "1"
b4b3ce
+
b4b3ce
+	# locking_type was removed from config in v2.03
b4b3ce
+	ocf_version_cmp "$(lvmconfig --version | awk '/LVM ver/ {sub(/\(.*/, "", $3); print $3}')" "2.03"
b4b3ce
+	if [ "$?" -eq 0 ]; then
b4b3ce
+		config_verify "global/locking_type" "1"
b4b3ce
+	fi
b4b3ce
 
b4b3ce
 	# We recommend to activate one LV at a time so that this specific volume
b4b3ce
 	# binds to a proper filesystem to protect the data