[Pacemaker] manually failing back resources when set sticky

Florian Haas florian at hastexo.com
Fri Mar 30 14:35:01 EDT 2012


On Fri, Mar 30, 2012 at 8:26 PM, Brian J. Murrell <brian at interlinx.bc.ca> wrote:
> In my cluster configuration, each resource can be run on one of two node
> and I designate a "primary" and a "secondary" using location constraints
> such as:
>
> location FOO-primary FOO 20: bar1
> location FOO-secondary FOO 10: bar2
>
> And I also set a default stickiness to prevent auto-fail-back (i.e. to
> prevent flapping):
>
> rsc_defaults $id="rsc-options" resource-stickiness="1000"
>
> This all works as I expect.  Resources run where I expect them to while
> everything is operating normally and when a node fails the resource
> migrates to the secondary and stays there even when the primary node
> comes back.
>
> The question is, what is the proper administrative command(s) to move
> the resource back to it's "primary" after I have manually determined
> that that node is OK after coming back from a failure?
>
> I figure I could just create a new resource constraint, wait for the
> migration and then remove it, but I just wonder if there is a more
> atomic "move back to your preferred node" command I can issue.

crm configure rsc_defaults resource-stickiness=0

... and then when resources have moved back, set it to 1000 again.
It's really that simple. :)

Cheers,
Florian

-- 
Need help with High Availability?
http://www.hastexo.com/now




More information about the Pacemaker mailing list