[ClusterLabs] Antw: [EXT] best practice for scripting

Ulrich Windl Ulrich.Windl at rz.uni-regensburg.de
Tue Apr 13 03:33:40 EDT 2021


>>> d tbsky <tbskyd at gmail.com> schrieb am 13.04.2021 um 09:17 in Nachricht
<CAC6SzHKoA=jrSaZH1q2J5tjqM7jiN_0tG0wemuf2_JLEJa-zUQ at mail.gmail.com>:
> Hi:
>     I have some scripts which use 'pcs' and 'crm_mon'. I prefer pcs
> since it is an all‑in‑one tool. but besides 'pcs cluster cib' it has
> no stable text output. reading document of pacemaker 2.1 I found it
> says:
> 
> "In addition to crm_mon and stonith_admin, the crmadmin, crm_resource,
> crm_simulate, and crm_verify commands now support the ‑‑output‑as and
> ‑‑output‑to options, including XML output (which scripts and
> higher‑level tools are strongly recommended to use instead of trying
> to parse the text output, which may change from release to release)."
> 
> so if I need to parse the command output, I think I should study these
> commands instead of pcs in the future?  RedHat is doing great job to
> maintain the 'pcs' output consistency between minor versions (eg:
> 7.2‑> 7.3). but with major version 7‑>8 many things changed. if there
> is a more stable method for scripting I would like to follow it.

"Coming from SUSE" I'm using crm shell for most tasks, and I think the syntax
is quite good.


> 
> thanks a lot for help!
> _______________________________________________
> Manage your subscription:
> https://lists.clusterlabs.org/mailman/listinfo/users 
> 
> ClusterLabs home: https://www.clusterlabs.org/ 





More information about the Users mailing list