HomeClusterLabs Projects

Low: libpacemaker: Show pcmkd status if we can't get native CIB

Description

Low: libpacemaker: Show pcmkd status if we can't get native CIB

In pcmk__status(), show the pacemakerd state if and only if:

  • we're using cib_native (so we need a pacemakerd connection to get the CIB), and
  • we can't get the CIB (either due to the pacemakerd state or due to a query error)

One could argue that we should show the pacemakerd status no matter what
for XML output formats, even if we can get the CIB. (I would agree with
that.) However, it doesn't seem worth it unless a user expresses a need.

  • If we put the condition in pcmk__status(), we'd have to check out->fmt_name, which we generally avoid.
  • If we put the condition in the format messages, the logic determining what states to show under what circumstances gets clunky.

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

Details

Provenance
nrwahl2Authored on Oct 27 2022, 1:35 AM
Parents
rP77e751f3579f: Refactor: libpacemaker: Use time_t with pacemakerd-health message
Branches
Unknown
Tags
Unknown