HomeClusterLabs Projects

Low: controller: use pcmk__new_reply() to create reprobe reply

This commit no longer exists in the repository. It may have been part of a branch which was deleted.

Description

Low: controller: use pcmk__new_reply() to create reprobe reply

handle_reprobe_op() previously used create_request() rather than
pcmknew_reply() to create a reply for the reprobe op, probably because the
function did not have the original message that pcmk
new_reply() requires as
an argument.

However we do want replies to be properly formed, so pass the original message
to the function and use it to create the reply. This changes a couple of
attributes in the created message: PCMKXA_SUBT is now correctly
PCMK
VALUE_RESPONSE, and PCMK_XA_REFERENCE is now the message ID from the
original message rather than a new generated ID.

Additionally, the previous code set CRM_OP_INVOKE_LRM as PCMKXA_CRM_TASK
instead of copying the original value (CRM_OP_REPROBE). This was a bug, causing
lib/common/ipc_controld.c:dispatch() to set reply_data.reply_type to
pcmk_controld_reply_resource instead of pcmk_controld_reply_reprobe. This had
no practical effect since the only internal caller (crm_resource --refresh
without a resource specified) ignored the value. pcmk
new_reply() copies the
original value.

Details

Provenance
kgaillotAuthored on Jul 11 2024, 7:23 PM

Commit No Longer Exists

This commit no longer exists in the repository.