[Pacemaker] crm_simulate examples...

Andrew Beekhof andrew at beekhof.net
Tue Jun 21 05:17:10 UTC 2011


On Fri, May 27, 2011 at 2:43 AM, Dejan Muhamedagic <dejanmm at fastmail.fm> wrote:
> Hi,
>
> On Thu, May 26, 2011 at 10:22:25AM -0400, Rick Beldin wrote:
>> Hi...
>>
>> I was wondering if anyone can share some examples of using crm_simulate.
>> The documentation on this tool is quite skimpy, and seems limited to
>> the --help that comes from the tool itself.
>
> You can try:
>
> $ CIB_file=cib.xml crm configure cibstatus
>
> Then modify status with op or node commands. Then do simulate.
> Didn't use that myself, there's some documentation though (help
> simulate, help op, etc).
>
>> I was thinking that this could be used in a support environment to
>> test and simulate problems with customer configurations.
>
> Yes, that is one of the use cases.

The primary one in fact :-)
Its used extensively for the PE regression tests (look for
pengine/regression.core.sh) and you can do things like take a config
with no status section and then run:

crm_simulate --in-place myconfig.xml --node-up mynode --simulate

You can also do things like have parts of the resulting transition
fail with --op-fail or simulate resource failures with --op-inject.




More information about the Pacemaker mailing list