resource-agents/SOURCES/bz1820523-exportfs-2-fix-monitor-action.patch
2021-09-10 03:52:59 +00:00

36 lines
949 B
Diff

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