HomeClusterLabs Projects

Refactor: various: Don't set cluster-layer node ID as XML ID

Description

Refactor: various: Don't set cluster-layer node ID as XML ID

Currently, we call the pcmkxe_set_id() function using a stringified
version of the numeric cluster-layer node ID. However, pcmk
xe_set_id()
tries to sanitize its input to a valid XML ID. An XML ID cannot begin
with a digit.

crm_xml_set_id() does not sanitize comprehensively, and in particular,
it does not care whether its argument begins with a digit. So the
current code doesn't cause a problem.

Still, as a best practice, set the PCMK_XA_ID attribute using
crm_xml_add_ll() instead.

Ref T848

Signed-off-by: Reid Wahl <nrwahl@protonmail.com>