resource-agents/SOURCES/bz1969968-lvmlockd-remove-with_cmirrord.patch
2021-09-10 03:53:18 +00:00

83 lines
2.0 KiB
Diff

diff --color -uNr a/heartbeat/lvmlockd b/heartbeat/lvmlockd
--- a/heartbeat/lvmlockd 2021-06-11 16:08:37.725598299 +0200
+++ b/heartbeat/lvmlockd 2021-06-11 16:10:38.690910781 +0200
@@ -59,14 +59,6 @@
<shortdesc lang="en">This agent manages the lvmlockd daemon</shortdesc>
<parameters>
-<parameter name="with_cmirrord" unique="0" required="0">
-<longdesc lang="en">
-Start with cmirrord (cluster mirror log daemon).
-</longdesc>
-<shortdesc lang="en">activate cmirrord</shortdesc>
-<content type="boolean" default="false" />
-</parameter>
-
<parameter name="pidfile" unique="0">
<longdesc lang="en">pid file</longdesc>
<shortdesc lang="en">pid file</shortdesc>
@@ -110,7 +102,6 @@
: ${OCF_RESKEY_pidfile:="/run/lvmlockd.pid"}
LOCKD="lvmlockd"
-CMIRRORD="cmirrord"
# 0.5s sleep each count
TIMEOUT_COUNT=20
@@ -150,12 +141,6 @@
rc=$?
mirror_rc=$rc
- if ocf_is_true $OCF_RESKEY_with_cmirrord; then
- pid=$(pgrep $CMIRRORD | head -n1)
- daemon_is_running "$pid"
- mirror_rc=$?
- fi
-
# If these ever don't match, return error to force recovery
if [ $mirror_rc -ne $rc ]; then
return $OCF_ERR_GENERIC
@@ -235,16 +220,6 @@
return $OCF_SUCCESS
fi
- if ocf_is_true $OCF_RESKEY_with_cmirrord; then
- ocf_log info "starting ${CMIRRORD}..."
- $CMIRRORD
- rc=$?
- if [ $rc -ne $OCF_SUCCESS ] ; then
- ocf_exit_reason "Failed to start ${CMIRRORD}, exit code: $rc"
- return $OCF_ERR_GENERIC
- fi
- fi
-
if [ ! -z "$OCF_RESKEY_socket_path" ] ; then
extras="$extras -s ${OCF_RESKEY_socket_path}"
fi
@@ -341,13 +316,8 @@
pid=$(get_pid)
kill_stop $LOCKD $pid
- if ocf_is_true $OCF_RESKEY_with_cmirrord; then
- pid=$(pgrep $CMIRRORD)
- kill_stop $CMIRRORD $pid
- fi
-
if silent_status ; then
- ocf_exit_reason "Failed to stop, ${LOCKD} or ${CMIRRORD} still running."
+ ocf_exit_reason "Failed to stop, ${LOCKD} still running."
return $OCF_ERR_GENERIC
fi
@@ -370,10 +340,6 @@
check_binary pgrep
check_binary lvmlockctl
- if ocf_is_true $OCF_RESKEY_with_cmirrord; then
- check_binary $CMIRRORD
- fi
-
return $OCF_SUCCESS
}