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

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