HomeClusterLabs Projects

Refactor: fencing: pass full result to async action callback

Description

Refactor: fencing: pass full result to async action callback

When executing an asynchronous fence agent command, the fencing library gets
the full result (exit status, execution status, and exit reason) from the
services library, then maps that to a legacy return code.

Now, pass the full result object to the fencing async callback, rather than
separate arguments for legacy code and stdout. The mapping to a legacy code now
happens in the fencer rather than the fencing library.

The goal of this and following commits is to push the full result object
further down the code path, so that ultimately the full result is always
available internally, and the legacy code mapping is only done for backward
compatibility when sending the result back to a client.

This commit focuses on the async callback (done_cb() in both the fencer's
async_command_t and the fencing library's stonith_action_t). Later commits will
follow the chain:

st_child_done() and stonith_fence_get_devices_cb()
-> stonith_send_async_reply()
-> stonith_construct_async_reply() and log_async_result()

Details

Provenance
kgaillotAuthored on Sep 21 2021, 2:05 PM
Parents
rP153c9b552a5b: Refactor: fencing: return full result from stonith__action_result()
Branches
Unknown
Tags
Unknown

Event Timeline