[Pacemaker] A question and demand to a resource placement strategy function

Yan Gao ygao at novell.com
Tue Apr 19 07:55:04 EDT 2011


On 04/18/11 18:17, Yuusuke IIDA wrote:
> * When it is not dispersed well
> When I produced trouble in a resource in order of next, I am partial, and the
> resource is placed in one node.
> 
> main_rsc3 ->  main_rsc2 ->  main_rsc1
> 
> Online: [srv-b1 srv-b2 srv-a1]
> Full list of resources:
> main_rsc1 (ocf::pacemaker:Dummy): Started srv-b1
> main_rsc2 (ocf::pacemaker:Dummy): Started srv-b1
> main_rsc3 (ocf::pacemaker:Dummy): Started srv-b1
> 
> # crm configure ptest utilization
> Utilization information:
> Original: srv-b2 capacity: capacity=3
> Original: srv-b1 capacity: capacity=3
> Original: srv-a1 capacity: capacity=3
> calculate_utilization: main_rsc1 utilization on srv-b1: capacity=1
> calculate_utilization: main_rsc2 utilization on srv-b1: capacity=1
> calculate_utilization: main_rsc3 utilization on srv-b1: capacity=1
> Remaining: srv-b2 capacity: capacity=3
> Remaining: srv-b1 capacity: capacity=0
> Remaining: srv-a1 capacity: capacity=3
> 
> I think that this problem occurs by difference in order of handling of resource.
Exactly. Given the allocation scores are as the following at this time:

native_color: main_rsc1 allocation score on srv-a1: -INFINITY
native_color: main_rsc1 allocation score on srv-b1: 100
native_color: main_rsc1 allocation score on srv-b2: 100
native_color: main_rsc2 allocation score on srv-a1: -INFINITY
native_color: main_rsc2 allocation score on srv-b1: INFINITY
native_color: main_rsc2 allocation score on srv-b2: 100
native_color: main_rsc3 allocation score on srv-a1: -INFINITY
native_color: main_rsc3 allocation score on srv-b1: INFINITY
native_color: main_rsc3 allocation score on srv-b2: 100

And the resources would get assigned from top to bottom.

Actually I've been optimizing the placement-strategy lately. It will
sort the resource processing order according to the priorities and
scores of resources. That should result in ideal placement. Stay tuned.

Regards,
  Yan
-- 
Yan Gao <ygao at novell.com>
Software Engineer
China Server Team, OPS Engineering, Novell, Inc.




More information about the Pacemaker mailing list