17
0
Files
resource-agents/nfsnotify.patch
Dominique Leuenberger b4687ad700 Accepting request 950480 from network:ha-clustering:Factory
Please accept the change in the earlier changelog section. The jira cross referenc was miss placed.
- nfs ganehsa failover takes 5 minutes for the client to regain
  access to nfs share (bsc#1184382)
  - add adapted proposed patches
    portblock.patch nfsnotify.patch
- Update to version 4.10.0+git40.0f4de473:
  * openstack-common: get_config(): expand tilde and exit for errors
  * openstack-*: hardcode clouds.yaml paths as openstack cli doesnt support overriding it
  * openstack-*: add support for multiple setup options
  * LVM-activate: replace error log messages with calls to ocf_exit_reason (#1730)
  * configure: fix typo (#1732)
  * build: workaround gcc 12 warning
  * openstack-info: align op timeout with other openstack agents
  * openstack-*: allow agents to perform insecure connections to openstackcli
  * Route: return OCF_NOT_RUNNING for probe action when interface or route doesnt exist
  * podman: remove anonymous volumes

  * [rpm] fix Requires to allow install on opensuse (#1721)
  * Filesystem: unmount bind mounts before unmount file system (jsc#SLE-21043)

OBS-URL: https://build.opensuse.org/request/show/950480
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/resource-agents?expand=0&rev=113
2022-02-03 22:15:32 +00:00

96 lines
3.3 KiB
Diff

--- heartbeat/nfsnotify.in.orig 2021-12-06 11:36:48.000000000 +0100
+++ heartbeat/nfsnotify.in 2022-01-19 15:14:17.424694351 +0100
@@ -34,9 +34,11 @@
OCF_RESKEY_source_host_default=""
OCF_RESKEY_notify_args_default=""
+OCF_RESKEY_statd_path_default="/var/lib/nfs/statd"
: ${OCF_RESKEY_source_host=${OCF_RESKEY_source_host_default}}
: ${OCF_RESKEY_notify_args=${OCF_RESKEY_notify_args_default}}
+: ${OCF_RESKEY_statd_path=${OCF_RESKEY_statd_path_default}}
#######################################################################
@@ -50,7 +52,6 @@
NFSNOTIFY_TMP_DIR="${HA_RSCTMP}/nfsnotify_${OCF_RESOURCE_INSTANCE}/"
HA_STATD_PIDFILE="$NFSNOTIFY_TMP_DIR/rpc.statd_${OCF_RESOURCE_INSTANCE}.pid"
HA_STATD_PIDFILE_PREV="$NFSNOTIFY_TMP_DIR/rpc.statd_${OCF_RESOURCE_INSTANCE}.pid.prev"
-STATD_PATH="/var/lib/nfs/statd"
SM_NOTIFY_BINARY="${sbindir}/sm-notify"
IS_RENOTIFY=0
@@ -78,6 +79,15 @@
<content type="string" default="${OCF_RESKEY_source_host_default}" />
</parameter>
+<parameter name="statd_path" unique="0" required="0">
+<longdesc lang="en">
+Path to the directory in which the statd state lives. This needs
+to be on shared storage.
+</longdesc>
+<shortdesc lang="en">statd state directory path</shortdesc>
+<content type="string" default="${OCF_RESKEY_statd_path_default}" />
+</parameter>
+
<parameter name="notify_args" unique="0" required="0">
<longdesc lang="en">
Additional arguments to send to the sm-notify command. By default
@@ -91,6 +101,15 @@
<content type="string" default="${OCF_RESKEY_notify_args_default}" />
</parameter>
+<parameter name="statd_path" unique="0" required="0">
+<longdesc lang="en">
+Path to the directory in which the statd state lives. This needs
+to be on shared storage.
+</longdesc>
+<shortdesc lang="en">statd state directory path</shortdesc>
+<content type="string" default="${OCF_RESKEY_statd_path_default}" />
+</parameter>
+
</parameters>
<actions>
@@ -246,12 +265,12 @@
is_renotify=1
fi
- statd_backup="$STATD_PATH/nfsnotify.bu"
- copy_statd "$STATD_PATH" "$statd_backup"
+ statd_backup="$OCF_RESKEY_statd_path/nfsnotify.bu"
+ copy_statd "$OCF_RESKEY_statd_path" "$statd_backup"
if [ -z "$OCF_RESKEY_source_host" ]; then
if [ "$is_renotify" -eq 0 ]; then
- cur_statd="$STATD_PATH"
+ cur_statd="$OCF_RESKEY_statd_path"
else
cur_statd="$statd_backup"
fi
@@ -271,13 +290,13 @@
# have the first sm-notify use the actual statd directory so the
# notify list can be managed properly.
if [ "$is_renotify" -eq 0 ]; then
- cur_statd="$STATD_PATH"
+ cur_statd="$OCF_RESKEY_statd_path"
# everything after the first notify we are considering a renotification
# which means we don't use the real statd directory.
is_renotify=1
else
# use our copied statd directory for the remaining ip addresses
- cur_statd="$STATD_PATH/nfsnotify_${OCF_RESOURCE_INSTANCE}_${ip}"
+ cur_statd="$OCF_RESKEY_statd_path/nfsnotify_${OCF_RESOURCE_INSTANCE}_${ip}"
copy_statd "$statd_backup" "$cur_statd"
fi
@@ -312,7 +331,7 @@
which restorecon > /dev/null 2>&1 && selinuxenabled
SELINUX_ENABLED=$?
if [ $SELINUX_ENABLED -eq 0 ]; then
- export SELINUX_LABEL="$(ls -dZ $STATD_PATH | grep -o '\S\+:\S\+:\S\+')"
+ export SELINUX_LABEL="$(ls -dZ $OCF_RESKEY_statd_path | grep -o '\S\+:\S\+:\S\+')"
fi
case $__OCF_ACTION in