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

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