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

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