HomeClusterLabs Projects

Refactor: fencing: use pcmk__action_result_t in stonith_action_t

Description

Refactor: fencing: use pcmk__action_result_t in stonith_action_t

stonith_action_t previously had an rc member for a legacy return code, along
with output and error members for action stdout/stderr. When setting rc based
on the svc_action_t result, it used a mapping function svc_action_to_errno().

This replaces those with a pcmk__action_result_t member, which means we now
track the exit status and execution status as originally set by libcrmservice,
rather than the mapped rc. The library now calls the mapping function, now
returning standard codes and called result2rc(), when calling the client
callback.

The exit_reason member is unused as of this commit.

The behavior should be identical, with the small exception of
services_action_async() failure leaving the exit status as set by the services
library, which means callers will get the result2rc() mapping of the actual
result instead of the former -ECONNABORTED.

Details

Provenance
kgaillotAuthored on Sep 21 2021, 11:47 AM
Parents
rP0b835c9c60d5: Merge pull request #2557 from ClusterLabs/2.1
Branches
Unknown
Tags
Unknown

Event Timeline