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

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