Looking at the resource agent's (RA) source, it looks like enabling the debug option by setting it to warn
is what you'd want to do.
If for some reason that behavior isn't what you want, changing the 1)
case statement in the ping_check()
function as shown below (line 305 in the ping RA) might be what you're looking for:
ping_check() {
active=0
for host in $OCF_RESKEY_host_list; do
p_exe=ping
case $(uname) in
Linux) p_args="-n -q -W $OCF_RESKEY_timeout -c $OCF_RESKEY_attempts";;
Darwin) p_args="-n -q -t $OCF_RESKEY_timeout -c $OCF_RESKEY_attempts -o";;
FreeBSD) p_args="-n -q -t $OCF_RESKEY_timeout -c $OCF_RESKEY_attempts -o";;
*) ocf_log err "Unknown host type: $(uname)"; exit $OCF_ERR_INSTALLED;;
esac
case "$host" in
*:*) p_exe=ping6
esac
ping_output=$($p_exe $p_args $OCF_RESKEY_options $host 2>&1); rc=$?
case $rc in
0)
active=$(expr $active + 1)
if [ $OCF_RESKEY_debug -gt 1 ]; then
ping_conditional_log info "$ping_output"
fi
;;
1) ocf_log warn "$host is inactive: $ping_output";;
*) ocf_log err "Unexpected result for '$p_exe $p_args $OCF_RESKEY_options $host' $rc: $ping_output";;
esac
But that change looks like it will follow the same logic as setting the param debug=warn
. I haven't tested this, just following the logic in the RA.
Also, if you do need to restart Pacemaker for some reason you can always put the cluster into maintenance-mode=true
before doing so. If maintenance-mode=true
is set Pacemaker will not start/stop/monitor services even while restarting. Just remember to set maintenance-mode=false
when you're done.