[ClusterLabs] Antw: [EXT] Move a resource only where another has Started

Andrei Borzenkov arvidjaar at gmail.com
Sun Oct 10 10:52:37 EDT 2021


On 10.10.2021 14:29, martin doc wrote:
> ok, I think I've solved my problem or at least part of it.
> 
> The issue was I was not including a "score" in any of my constraint statements. This meant that "INFINITY" was being used. The result is that the scores would always be the same.
> 

Resource balancing enters the picture only when scores are the same. If
scores are not the same, then node with the highest score wins and no
balancing can happen.

> e.g.
> 
> pcs colocation location App with VIP
> 
> gets a score of infinity as does
> 
> pcs constraint location App rule pingd gt 0
> 
> The solution was to do this:
> 
> pcs constraint location App rule score=100 pingd gt 0
> 
> and then put scores elsewhere. This now lets pcs do some work because the App and VIP are never located somewhere with a score of INFINITY.
> 

I am afraid I completely lost you. You have MyGW resource that checks
for connectivity; you want to run VIP resource on a node which has
connectivity and you have App resource which presumably has to run on a
node where VIP is active. What is there to balance in the first place?

> I don't know what the relationship is between utilization and scores, but seemingly utilization comes second to scores.
> 


For each resource pacemaker computes allocation scores for each node
(taking into account colocation). Node with the highest score wins. If
multiple nodes have the same score, pacemaker should select node
according to balancing strategy.

Given three resources we know about, balancing can sensibly apply only
to VIP; App is restricted to the node where VIP is (will become) active.
So there is no choice.


More information about the Users mailing list