Re: [ClusterLabs] best practice for scripting

2021-04-13 Thread d tbsky
Ken Gaillot > FYI, the old and new status XML are nearly identical. The old XML's > outermost element is > > >... > > > while the new XML has > > >... > > > > As long as you're not looking at those particular elements, parsing the > XML output is the same. > > The format is

Re: [ClusterLabs] best practice for scripting

2021-04-13 Thread Ken Gaillot
On Tue, 2021-04-13 at 23:32 +0800, d tbsky wrote: > Tomas Jelinek > > As we are aware of the difficulties of using pcs in scripts, we > > indeed > > have a long term goal to provide machine readable output from pcs. > > Since > > pcs started with a focus on producing human readable output, it's a

Re: [ClusterLabs] best practice for scripting

2021-04-13 Thread d tbsky
Tomas Jelinek > As we are aware of the difficulties of using pcs in scripts, we indeed > have a long term goal to provide machine readable output from pcs. Since > pcs started with a focus on producing human readable output, it's a lot > of work to do. Quite a big part of pcs code base cannot be

Re: [ClusterLabs] best practice for scripting

2021-04-13 Thread Tomas Jelinek
Hi, You can use 'pcs cluster cib' for pacemaker configuration and 'pcs cluster status xml' for pacemaker status. Both commands basically just pass xml obtained from pacemaker, though. As far as I know, corosync also provides parsable output, take a look at corosync-cmapctl. I'm not sure

[ClusterLabs] best practice for scripting

2021-04-13 Thread d tbsky
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,