HomeClusterLabs Projects

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

Description

Fix: 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.

The result is that the first character of the node ID string becomes an
underscore, making it impossible for the controller to parse it as an
int when it receives the node info request. In that case, the controller
will ignore the node ID and instead search for the passed-in node name
(if any) or the local node name. This yields the wrong result unless we
were trying to search for the local node.

This is a regression introduced by 09d13ae (not in any release yet).

Fixes T848

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