:
}
-ctdb_reconfigure_try_lock ()
+ctdb_reconfigure_take_lock ()
{
_ctdb_service_reconfigure_common
_lock="${_d}/reconfigure_lock"
) <"$_lock"
}
+ctdb_reconfigure_release_lock ()
+{
+ _ctdb_service_reconfigure_common
+ _lock="${_d}/reconfigure_lock"
+
+ rm -f "$_lock"
+}
+
ctdb_replay_monitor_status ()
{
echo "Replaying previous status for this script due to reconfigure..."
*) return 0 ;;
esac
- if ctdb_reconfigure_try_lock ; then
+ if ctdb_reconfigure_take_lock ; then
# No events covered by this function are running, so proceed
# with gay abandon.
case "$event_name" in
fi
;;
esac
+
+ ctdb_reconfigure_release_lock
else
# Somebody else is running an event we don't want to collide
# with. We proceed with caution.
ctdb_fake_scriptstatus 1 "ERROR" "$err"
-eventscript_call ctdb_reconfigure_try_lock
+eventscript_call ctdb_reconfigure_take_lock
required_result 1 <<EOF
Replaying previous status for this script due to reconfigure...
ctdb_fake_scriptstatus -62 "TIMEDOUT" "$err"
-eventscript_call ctdb_reconfigure_try_lock
+eventscript_call ctdb_reconfigure_take_lock
required_result 1 <<EOF
Replaying previous status for this script due to reconfigure...
ctdb_fake_scriptstatus -8 "DISABLED" "$err"
-eventscript_call ctdb_reconfigure_try_lock
+eventscript_call ctdb_reconfigure_take_lock
ok <<EOF
Replaying previous status for this script due to reconfigure...