[Pacemaker] How to stop a resource?
Arnold Krille
arnold at arnoldarts.de
Thu Mar 15 21:10:05 UTC 2012
Hi,
On 15.03.2012 14:39, Andreas Kurz wrote:
> On 03/15/2012 02:23 PM, Tim Ward wrote:
>>> From: Jake Smith [mailto:jsmith at argotec.com]
>>> Maybe totally in the wrong direction for what you want but...
>>> Put commands in a script and add a until loop with a pgrep
>>> test and sleep 1 till the specific resource is stopped then continue?
>> Yes, probably is in the wrong direction. I'm driving this from Java and have written an interface to the "crm" command, which is how I was advised to get at Pacemaker from Java when I enquired on this list.
> I think your problem is, that a "crm resource stop" is asynchronous ...
> it exits immediately, not waiting for the resource to stop eventually.
"crm stop <resource>" is synchronous: It returns as soon as the
stop-command has hit the clusters-command-queue :-)
But then it is asynchronous as it returns before the resource is
actually stopped.
The same applies to "start".
And I think I wish for the gui/cli monitoring tools to also show the
intermediate states of starting/stopping/migrating...
> How about looping on "crm resource status _resource_" before deleting?
Thats what you have to do.
Have fun,
Arnold
--
Dieses Email wurde elektronisch erstellt und ist ohne handschriftliche
Unterschrift gültig.
More information about the Pacemaker
mailing list