Red Hat Bugzilla – Bug 1469255
stonith-action=poweroff leads to failure in fence-agent
Last modified: 2017-12-06 20:09:21 EST
Description of problem:
According to documentation stonith-action is either set to reboot or poweroff.
In the poweroff-case this is propagated 1:1 into the RHCS-fence-agents which can't handle that action.
Version-Release number of selected component (if applicable):
found with upstream-master but there shouldn't be a difference to 1.1.17
Steps to Reproduce:
1. setup a config with a RHCS fencing-agent (e.g. fence_sbd)
2. pcs property set stonith-action=poweroff
3. have pacemaker trigger fencing e.g. by cutting the networking connection
Jul 10 10:52:46  bsul0799 stonith-ng: warning: log_action: fence_sbd stderr: [ Failed: Unrecognised action 'poweroff' ]
fence-agent properly turns off the fenced node
a test with 'pcs stonith fence ...' doesn't show the problem
stonith-action=off leads to pacemaker initiated fencing working properly but fencing with pcs is failing
qa-ack+: setting stonith-action=poweroff must work for all the fence agents
moved to rhel-7.6 due to effort constraints
Really? Shouldn't be that hard to map 'poweroff' to 'off' inside the stonith library
Pacemaker currently accepts the values "reboot", "off", or "poweroff" for stonith-action.
LHA-style external/* agents (which are supported upstream, but not in RHEL) do support "poweroff". Remapping "poweroff" to "off" globally would break those.
I see two reasonable approaches:
1. Drop support for stonith-action=poweroff. If someone wants to use poweroff with LHA agents, they must set stonith-action=off and pcmk_off_action=poweroff. (This is the cleanest and easiest option development-wise, but involves some pain for LHA users.)
2. Remap stonith-action=poweroff to stonith-action=off, and for LHA agents, also assume pcmk_off_action=poweroff if not otherwise set. (This is easiest for all users.)