[ClusterLabs] Antw: How Pacemaker reacts to fast changes of the same parameter in configuration

Tomas Jelinek tojeline at redhat.com
Tue Nov 8 10:13:17 EST 2016

Dne 8.11.2016 v 14:36 Ulrich Windl napsal(a):
>>>> Kostiantyn Ponomarenko <konstantin.ponomarenko at gmail.com> schrieb am 08.11.2016
> um 11:40 in Nachricht
> <CAEnTH0fJMM6D9W9+0efo6ha3MQ0FuKsTLXt1c7QjswhP9Ctc6Q at mail.gmail.com>:
>> Hi,
>> I need a way to do a manual fail-back on demand.
>> To be clear, I don't want it to be ON/OFF; I want it to be more like "one
>> shot".
>> So far I found that the most reasonable way to do it - is to set "resource
>> stickiness" to a different value, and then set it back to what it was.
>> To do that I created a simple script with two lines:
>>     crm configure rsc_defaults resource-stickiness=50
>>     crm configure rsc_defaults resource-stickiness=150
>> There are no timeouts before setting the original value back.
>> If I call this script, I get what I want - Pacemaker moves resources to
>> their preferred locations, and "resource stickiness" is set back to its
>> original value.

pcs has a command for this: pcs resource relocate show|dry-run|run

You're using crm, so maybe this information has no benefit for you 
unless you switch to pcs. It may however help others. Or you can install 
pcs and use it just for the relocation and do everything else with crm. 
That is if you're comfortable with installing pcs just for the sake of a 
single command.

>> Despite it works, I still have few concerns about this approach.
>> Will I get the same behavior under a big load with delays on systems in
>> cluster (which is truly possible and a normal case in my environment)?
>> How Pacemaker treats fast change of this parameter?
>> I am worried that if "resource stickiness" is set back to its original
>> value to fast, then no fail-back will happen. Is it possible, or I
>> shouldn't worry about it?
> What I do interactively is to wait for an "crmd[30170]:   notice: do_state_transition: State transition S_TRANSITION_ENGINE -> S_IDLE [ input=I_TE_SUCCESS cause=C_FSA_INTERNAL origin=notify_crmd ]" message before issuing the next command. I don't know whether there is a scriptable "wait for idle".

"crm_resource --wait" may be what you are looking for.


>> Thank you,
>> Kostia
> _______________________________________________
> Users mailing list: Users at clusterlabs.org
> http://clusterlabs.org/mailman/listinfo/users
> 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 Users mailing list