[ClusterLabs] Proposal for machine-friendly output from Pacemaker tools

Ken Gaillot kgaillot at redhat.com
Tue Jan 8 11:07:15 EST 2019


On Tue, 2019-01-08 at 10:30 +0100, Kristoffer Grönlund wrote:
> On Mon, 2019-01-07 at 17:52 -0600, Ken Gaillot wrote:
> > There has been some discussion in the past about generating more
> > machine-friendly output from pacemaker CLI tools for scripting and
> > high-level interfaces, as well as possibly adding a pacemaker REST
> > API.
> > 
> > I've filed an RFE BZ
> > 
> >  https://bugs.clusterlabs.org/show_bug.cgi?id=5376
> > 
> > to design an output interface that would suit these goals. An
> > actual
> > REST API is not planned at this point, but this would provide a key
> > component of any future implementation.
> 
> Having all the tools able to produce XML output like cibadmin and
> crm_mon would be good in general, I think. So that seems like a good
> proposal to me.
> 
> In the case of an error, at least in my experience just getting a
> return code and stderr output is enough to make sense of it - getting
> XML on stderr in the case of an error wouldn't seem like something
> that
> would add much value to me.

There are two benefits: it can give extended information (such as the
text string that corresponds to a numeric exit status), and because it
would also be used by any future REST API (which won't have stderr),
API/CLI output could be parsed identically.

> Cheers,
> Kristoffer
> 
> > 
> > The question is what machine-friendly output should look like. The
> > basic idea is: for commands like "crm_resource --constraints" or
> > "stonith_admin --history", what output format would be most useful
> > for
> > a GUI or other program to parse?
> > 
> > Suggestions welcome here and/or on the bz ...




More information about the Users mailing list