[ClusterLabs] Antw: Coming in Pacemaker 2.0.3: crm_mon output changes

Ulrich Windl Ulrich.Windl at rz.uni-regensburg.de
Tue Oct 15 02:42:02 EDT 2019

>>> Ken Gaillot <kgaillot at redhat.com> schrieb am 15.10.2019 um 00:47 in
<bb7ed08d2044a7ccc14bd986cdea709caadee9cb.camel at redhat.com>:
> Hi all,
> With Pacemaker 2.0.2, we introduced a new experimental option for XML
> output from stonith_admin. This was the test case for a new output
> model for Pacemaker tools. I'm happy to say this has been extended to
> crm_mon and will be considered stable as of 2.0.3.
> crm_mon has always supported text, curses, HTML, and XML output, and
> that doesn't change. However the command‑line options for those have
> been deprecated and replaced with new forms:
> Old:                New:
> ‑‑as‑xml            ‑‑output‑as=xml
> ‑‑as‑html=FILE      ‑‑output‑as=html ‑‑output‑to=FILE
> ‑‑web‑cgi           ‑‑output‑as=html ‑‑output‑cgi
> ‑‑disable‑ncurses   ‑‑output‑as=text

I'd prefer "--output-format|output-fmt|format" over "--format-as", because I
think it's more clear.
Accordingly I'd prefer "--output-file" over "--output-to".
Why not replace "--weg-cgi" with "--output-format=cgi"?

> The new ‑‑output‑as and ‑‑output‑to options are identical to
> stonith_admin's, and will eventually be supported by all Pacemaker
> tools. Each tool may support a different set of formats; for example,
> stonith_admin supports text and xml.
> When called with ‑‑as‑xml, crm_mon's XML output will be identical to
> previous versions. When called with the new ‑‑output‑as=xml option, it
> will be slightly different: the outmost element will be a <pacemaker‑
> result> element, which will be consistent across all tools. The old XML

Why not as simple "status" element? "-result" doesn't really add anything

> schema remains documented in crm_mon.rng; the new XML schema will be
> documented in an api‑result.rng schema that will encompass all tools'
> XML output.
> Beyond those interface changes, the text output displayed by crm_mon
> has been tweaked slightly. It is more organized with list headings and
> bullets. Hopefully you will find this easier to read. We welcome any
> feedback or suggestions for improvement.

Older versions use a mixture of space for indent, and '*' and '+' as bullets.
A unified approach would be either to use some amount of spaces or one TAB for
indenting consistently, maybe combined with a set of bullet characters for the
individual levels of indent.

So "--bullet-list='*+'" and "--indent-string=..." could set such.

> The HTML output gains a new feature as well: it uses CSS throughout,
> rather than ancient HTML formatting, and you can provide a custom
> stylesheet (via ‑‑output‑stylesheet‑link=URL) to control how the page
> looks.

As it only applies to HTML, why not "--html-style=URL". I think nobody will
confuse this with providing the stylesheet literally as parameter...

> If you are a heavy user of crm_mon, we encourage you to test the new
> release (expected later this week) and let us know what you like and
> don't like. You don't have to upgrade a whole cluster to test crm_mon;
> you can install the new release on a test machine, copy the CIB from
> your cluster to it, and run it like: CIB_file=/path/to/copied/cib.xml
> crm_mon <options>. That won't work with curses output, but you can test
> text, HTML, and XML that way.

BTW: Can we rename "-?" (version) to "-V" and "-V" (verbose) to "-v"? That'll
be more standard.
The possible outputs of "-s" could be documented in greater detail, possibly
allowing to query a specific resource (implementing some simple query language)
would be great. Not only for "-s", but also for all other output.


More information about the Users mailing list