HomeClusterLabs Projects

Refactor: tools: Remove some redundancies from crm_mon.c

Description

Refactor: tools: Remove some redundancies from crm_mon.c

pcmk__pacemakerd_status() can replace most of what the static
pacemakerd_status() was doing. A new setup_api_connections() function
can take the place of pacemakerd_status() and conditionally connect to
the fencer and CIB.

There's also no compelling reason to keep the use_cib_native and
on_remote_node variables. For the latter, we can use a global
pcmkd_state variable. (It may be desirable to use fewer globals, but
that's out of scope regardless.)

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

Details

Provenance
nrwahl2Authored on Nov 1 2022, 11:32 PM
Parents
rPb4121ef3740d: API: tools: Include Pacemaker status in crm_mon output
Branches
Unknown
Tags
Unknown