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

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