HomeClusterLabs Projects

Low: executor: improve stonith operation rc and status mapping

Description

Low: executor: improve stonith operation rc and status mapping

For stonith resource start, stop, and monitor operations, the equivalent
OCF return code and Pacemaker operation status have to be determined from the
fencer API return code. This commit makes several improvements:

  • Comment better
  • Functionize rc-to-status mapping for code isolation and readability
  • Map EOPNOTSUPP to OCF "unimplemented feature" rather than "unknown"
  • Map ETIME and ETIMEDOUT to OCF "timeout" rather than "unknown" (in addition to "timeout" operation status)
  • With the exception of ENOTCONN and ECOMM (which indicate an error in communication with the fencer rather than an error result from the agent), map other rc values to "done" operation status rather than "error" (error should be determined from OCF rc, as with non-stonith resources)

Details

Provenance
kgaillotAuthored on Feb 26 2019, 6:04 PM
Parents
rP700a0be8e47f: Low: executor: reschedule recurring stonith monitor if not connected
Branches
Unknown
Tags
Unknown

Event Timeline