[Pacemaker] crm_simulate a resource failure

Jake Smith jsmith at argotec.com
Tue Oct 23 13:27:07 EDT 2012


----- Original Message ----- 

> From: "Cal Heldenbrand" <cal at fbsdata.com>
> To: pacemaker at oss.clusterlabs.org
> Sent: Tuesday, October 23, 2012 11:50:11 AM
> Subject: [Pacemaker] crm_simulate a resource failure

> Hi everyone,

> I'm not able to find documentation or examples on this. If I have a
> cloned primitive set across a cluster, how can I simulate a failure
> of a resource on an individual node? I mainly want to see the scores
> on why a particular action is taken so I can adjust my configs.

> I think the --op-fail parameter is what I need, but I just don't get
> the syntax of the value in the man page.

I usually use the crm shell so I'm not positive but I think these are the parts you need...

$rsc_$task_$interval@$node=$rc

$rsc = resource to test, in your case I believe you want to specify the primitive instance of the clone i.e. p_resource:0
$task = monitor or migrate or stop or whatever operation you want to take
$interval = the interval of a monitor task
$node = the node
$rc = the exit code you want to fail with i.e. error, not_running

So (I think) something like:
--op-fail=$p_of_clone_resource:0_$monitor_$10@$node1=$not_running

You *should* be able to experiment till you get it just right since its simulate.. :-)

HTH

Jake

> Thank you!

> --Cal

> _______________________________________________
> 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




More information about the Pacemaker mailing list