[ClusterLabs] best practice for scripting

d tbsky tbskyd at gmail.com
Tue Apr 13 03:17:34 EDT 2021


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.

thanks a lot for help!


More information about the Users mailing list