Hi,
Sorry for the delay. I've been thinking about it...
On 07/14/11 12:21, Andrew Beekhof wrote:
> This loop looks wrong
>
> + for(gIter2 = resource1->rsc_cons; gIter2 != NULL; gIter2 =
> gIter2->next) {
>
> You're very dependant on the number and order of constraints because
> of the way resource1_weight is being updated.
> AFAICS, this only works if there is a single non INFINITY constraint.
Indeed. We can hardly tell what exactly the resources' scores are before
allocating resources. The scores would be merged/updated during
allocating. That means that we can hardly tell what the best allocating
order is before allocating resources. What "sort_rsc_process_order()"
does is just to predict a relatively ideal order.
>
> I'll take a look at the before and after results tomorrow and see if
> there might be a better way to achieve the same results.
That would be great. Thanks!
Regards,
Yan
--
Gao,Yan <[email protected]>
Software Engineer
China Server Team, SUSE.
_______________________________________________
Pacemaker mailing list: [email protected]
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://developerbugs.linux-foundation.org/enter_bug.cgi?product=Pacemaker