Blame SOURCES/bz1820523-exportfs-2-fix-monitor-action.patch

5371d1
From fda12d3d6495e33e049ed3ac03d6bfb4d65aac3d Mon Sep 17 00:00:00 2001
5371d1
From: Oyvind Albrigtsen <oalbrigt@redhat.com>
5371d1
Date: Tue, 9 Jun 2020 10:27:13 +0200
5371d1
Subject: [PATCH] exportfs: fix monitor-action in symlink-logic for when
5371d1
 directory doesnt exist
5371d1
5371d1
---
5371d1
 heartbeat/exportfs | 14 ++++++++++----
5371d1
 1 file changed, 10 insertions(+), 4 deletions(-)
5371d1
5371d1
diff --git a/heartbeat/exportfs b/heartbeat/exportfs
5371d1
index 294d7eec9..d7d3463d9 100755
5371d1
--- a/heartbeat/exportfs
5371d1
+++ b/heartbeat/exportfs
5371d1
@@ -463,10 +463,16 @@ for dir in $OCF_RESKEY_directory; do
5371d1
 			fi
5371d1
 		fi
5371d1
 	else
5371d1
-		if [ "$__OCF_ACTION" != "stop" ]; then
5371d1
-			ocf_exit_reason "$dir does not exist"
5371d1
-			exit $OCF_ERR_CONFIGURED
5371d1
-		fi
5371d1
+		case "$__OCF_ACTION" in
5371d1
+			stop|monitor)
5371d1
+				canonicalized_dir="$dir"
5371d1
+				ocf_log debug "$dir does not exist"
5371d1
+				;;
5371d1
+			*)
5371d1
+				ocf_exit_reason "$dir does not exist"
5371d1
+				exit $OCF_ERR_CONFIGURED
5371d1
+				;;
5371d1
+		esac
5371d1
 	fi
5371d1
 	directories+="$canonicalized_dir "
5371d1
 done