[Pacemaker] command to dump cluster configuration in "pcs" format?

Andrew Beekhof andrew at beekhof.net
Thu Jan 16 01:02:20 EST 2014

On 16 Jan 2014, at 3:25 pm, Bob Haxo <bhaxo at sgi.com> wrote:

> On Thu, 2014-01-16 at 12:32 +1100, Andrew Beekhof wrote:
>> On 16 Jan 2014, at 11:49 am, Bob Haxo <bhaxo at sgi.com> wrote:
>>>> On 01/15/2014 05:02 PM, Bob Haxo wrote:
>>>>> Greetings,
>>>>> The command  "crm configure show" dumps the cluster configuration in a format
>>>>> that is suitable for use in configuring a cluster.
>>>>> The command "pcs config" generates nice human readable information, but this is
>>>>> not directly suitable for use in configuring a cluster.
>>>>> Is there a "pcs" command analogous to the "crm" command that dumps the cluster
>>>>> configuration in "pcs" format?
>>> On Wed, 2014-01-15 at 17:55 -0600, Chris Feist wrote:
>>>> Currently there is not.  We may at some point look into this, but it isn't on my 
>>>> short term list of things to do.
>>>> Thanks,
>>>> Chris
>>> Oh, well, bummer ... but at least I hadn't missed the command in the docs or 
>> in the installed code.
>> There list of commands you used to build a cluster is in the history too remember.
>> You could just save that to a file instead and restore with bash 
>> ./bit-of-history-i-care-about
> How very nice it would have been had I been able to have just entered
> the correct commands at single time in a single shell instance.
> Unfortunately, it configuration has taken me weeks to develop (what now
> seems to be) a working configuration (including mods to the
> VirtualDomain agent to avoid spurious restarts of the VM).

Now that its done though, I'd not have thought reverse engineering the pcs commands was /that/ hard (from the xml or shell history).
And once you have that it's not so far from "crm show".

The challenge with forcing your input and output formats to match is that you're limited to how smart you can make the input side of things.
For example, having one command create both an ordering and colocation constraint is challenging... how do you determine whether to merge them or leave them separate when representing it in the output?
(Hint: no matter which option you pick someone will complain it should be the other :-)

Its not a completely black and white discussion...

>>> I'll probably use "crm configure show" to capture the "pcs" created 
>> configuration for installations ... and save the "pcs" for when I
>> correspond with RedHat.
>>> Dumping and loading the xml really is not an option.
>> You dump and load xml a lot?
> No, but I did read that pcs can dump/load the cib xml.

Sorry, I meant the config (regardless of format).

>> Even assuming yes, its in a file that you don't have 
>> to read... so where is the problem?
> The problem is that this goes into a product that gets shipped to mfg,
> and then to customers, and then needs to be supported by other engineers
> (and then often back to me).  
> Easy to create configurations with crm and then load
> (crm -f file) the Pacemaker configuration using the crm commands created
> with "crm configure show", with some scripted substitutions for
> hostnames, IP addresses, and other site customizations.
> The SLES HAE uses crm, and I'm trying to make SLES and RHEL versions as
> identical as possible.  Makes it easier for me to maintain, and for
> others to support.

Fair enough.

>>> Regards,
>>> Bob Haxo
>>>>> Regards,
>>>>> Bob Haxo
>>>>> _______________________________________________
>>>>> Pacemaker mailing list: Pacemaker at oss.clusterlabs.org
>>>>> http://oss.clusterlabs.org/mailman/listinfo/pacemaker
>>>>> Project Home: http://www.clusterlabs.org
>>>>> Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
>>>>> Bugs: http://bugs.clusterlabs.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 841 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <https://lists.clusterlabs.org/pipermail/pacemaker/attachments/20140116/b0b26776/attachment-0003.sig>

More information about the Pacemaker mailing list