[Pacemaker] Restart clone service on only one node

Dejan Muhamedagic dejanmm at fastmail.fm
Thu Jun 28 04:33:05 EDT 2012


Hi,

On Mon, Jun 25, 2012 at 07:51:10AM -0400, David Coulson wrote:
> I've a couple of cloned resources which need to be restarted one at
> a time as part of a batch process.
> 
> If I do a 'crm -w resource restart cl-whatever', it restarts the
> whole lot at once. I can do a 'service appname stop' on each box,
> wait for pacemaker to notice it is down, then let it restart it and
> move to the next one, but it's a difficult process establishing if
> pacemaker restarted it already.

You can create a negative preference location for the clone on
the target node:

crm -w configure location pref-cl-whatever-nodeA cl-whatever -inf: nodeA

Then just remove it:

crm -w configure delete pref-cl-whatever-nodeA

Now, the bad news is that -w has no effect (to be fixed,
hopefully) in configure unless commit takes place, so the
following would work:

(echo location pref-cl-whatever-nodeA cl-whatever -inf: nodeA; echo commit) | 
crm -w configure
(echo delete pref-cl-whatever-nodeA; echo commit) | 
crm -w configure

HTH,

Dejan


> Is there a crm command to restart the resource on only one node? I
> tried doing 'crm -w resource restart re-whatever:0', but it told me
> the resource does not exist - That works for a cleanup though. I
> have other resources running on each node which I don't want
> restarted, so I can't put the node in standby and bring it back
> online.
> 
> I'm running Pacemaker 1.1.6-3.el6-a02c0f19a00c1eb2527ad38f146ebc0834814558
> 
> Thanks-
> David
> 
> _______________________________________________
> 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
> I've a couple of cloned resources which need to be restarted one at
> a time as part of a batch process.
> 
> If I do a 'crm -w resource restart cl-whatever', it restarts the
> whole lot at once. I can do a 'service appname stop' on each box,
> wait for pacemaker to notice it is down, then let it restart it and
> move to the next one, but it's a difficult process establishing if
> pacemaker restarted it already.
> 
> Is there a crm command to restart the resource on only one node? I
> tried doing 'crm -w resource restart re-whatever:0', but it told me
> the resource does not exist - That works for a cleanup though. I
> have other resources running on each node which I don't want
> restarted, so I can't put the node in standby and bring it back
> online.
> 
> I'm running Pacemaker 1.1.6-3.el6-a02c0f19a00c1eb2527ad38f146ebc0834814558
> 
> Thanks-
> David
> 
> _______________________________________________
> 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