Blame SOURCES/LVM-activate-1-warn-vg_access_mode.patch

b4b3ce
From 12ef5a343158bbfaa5233468a0506074fceaac81 Mon Sep 17 00:00:00 2001
b4b3ce
From: Oyvind Albrigtsen <oalbrigt@redhat.com>
b4b3ce
Date: Tue, 21 Aug 2018 12:14:49 +0200
b4b3ce
Subject: [PATCH] LVM-activate: return OCF_ERR_CONFIGURED for incorrect
b4b3ce
 vg_access_mode
b4b3ce
b4b3ce
---
b4b3ce
 heartbeat/LVM-activate | 7 +++----
b4b3ce
 1 file changed, 3 insertions(+), 4 deletions(-)
b4b3ce
b4b3ce
diff --git a/heartbeat/LVM-activate b/heartbeat/LVM-activate
b4b3ce
index fbd058288..55e36a2d2 100755
b4b3ce
--- a/heartbeat/LVM-activate
b4b3ce
+++ b/heartbeat/LVM-activate
b4b3ce
@@ -448,7 +448,7 @@ lvm_validate() {
b4b3ce
 		;;
b4b3ce
 	*)
b4b3ce
 		ocf_exit_reason "You specified an invalid value for vg_access_mode: $VG_access_mode"
b4b3ce
-		exit $OCF_ERR_ARGS
b4b3ce
+		exit $OCF_ERR_CONFIGURED
b4b3ce
 		;;
b4b3ce
 	esac
b4b3ce
 
b4b3ce
@@ -771,7 +771,6 @@ lvm_stop() {
b4b3ce
 		return $OCF_SUCCESS
b4b3ce
 	fi
b4b3ce
 
b4b3ce
-	lvm_validate
b4b3ce
 	ocf_log info "Deactivating ${vol}"
b4b3ce
 
b4b3ce
 	case ${VG_access_mode} in
b4b3ce
@@ -788,8 +787,8 @@ lvm_stop() {
b4b3ce
 		tagging_deactivate
b4b3ce
 		;;
b4b3ce
 	*)
b4b3ce
-		ocf_exit_reason "VG [${VG}] is not properly configured in cluster. It's unsafe!"
b4b3ce
-		exit $OCF_ERR_CONFIGURED
b4b3ce
+		ocf_log err "VG [${VG}] is not properly configured in cluster. It's unsafe!"
b4b3ce
+		exit $OCF_SUCCESS
b4b3ce
 		;;
b4b3ce
 	esac
b4b3ce