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

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