Thanks Andrew! My first few attempts at playing around with the failure states are working as expected.<br><br>A few follow-ups below:<br clear="all"><br><br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
--op-fail isn't the command you want though.<br>
>From the man page:<br>
<br>
-i, --op-inject=value<br>
$rsc_$task_$interval@$node=$rc - Inject the specified<br>
task before running the simulation<br>
<br>
-F, --op-fail=value<br>
$rsc_$task_$interval@$node=$rc - Fail the specified task<br>
while running the simulation<br>
<br>
Note the difference between the two descriptions: before vs. while.<br>
--op-inject is the one you want. It is mostly useful for pretending a<br>
recurring monitor failed and seeing what the cluster would do about<br>
it.<br>
<br>
--op-fail on the other hand, is used for pretending that part of the<br>
recovery process failed.<br></blockquote><div><br>Your follow up description here is great, and makes more sense. I was reading "Fail the specified task" as literally, "here's my task, fail it and show me the results" I'd suggest to add a little paragraph in the man page to elaborate these points too. Also, can you tell me what all of the return codes are? Do I have to use integers, or do strings like "error" work?<br>
<br>While we're on the subject of documentation / usability, I would also suggest to split out these two features into more parameters. (What would happen if I named my resource with an underscore?) Maybe something like:<br>
<br>--op-pre-resource=[primitive name]<br>--op-pre-task=[monitor|start|stop]<br>--op-pre-interval=[integer]<br>--op-pre-node=[hostname]<br>--op-pre-rc=[error|timeout|other stuff]<br><br>Then have similar --op-post-* parameters. Or whatever verbs make the most sense in the spirit of Pacemaker vocabulary. (pre/post, before/after, inject/fail, input/output, etc) And, examples are always awesome in man pages too.<br>
<br>Of course, this is all great future version stuff, but that doesn't help all of the RedHat 6 people that will be using pacemaker 1.1 packages for the next ~10 years until RedHat 7 comes out. So I suppose documenting the old code in the online docs is a Good Thing. :-)<br>
<br>Thanks again!<br><br>--Cal<br><br></div></div><br>