On Wed, Feb 6, 2013 at 10:09 AM, Jake Smith <jsm...@argotec.com> wrote:
>
> ----- Original Message -----
>> From: "Marcos Tiago" <marcos.ti...@openet.com>
>> To: pacemaker@oss.clusterlabs.org
>> Sent: Tuesday, February 5, 2013 3:11:13 PM
>> Subject: [Pacemaker] How are Scores computed regarding roles?
>>
>>
>>
>>
>>
>> Guys,
>>
>>
>>
>> I am having trouble configuring a collocation in crm (corosync), but
>> I am not sure if what I want is possible. This is the scenario:
>>
>>
>>
>> Let's say it's a 2 node cluster, with one resource in each. RES1 is
>> with location inf in Node1, and RES2 is with location inf in Node2.
>> Both resources are in Started role.
>>
>>
>>
>> I have a third resource (IP address) that has: colocation 20 with
>> RES1 and colocation 10 with RES2, so that if RES1 fails, it moves to
>> node2.
>>
>>
>>
>> When RES1 is restarted after a failure, the IP resource moves to Node
>> 1, as expected.
>>
>>
>>
>> But the IP is moving to Node 1 * before * RES1 is in Started state,
>> which is not good for my situation because RES1 is not ready to
>> receive requests yet.
>>
>>
>>
>> I would like the IP to move back to Node 1 only when RES1 is in
>> Started role.
>>
>>
>>
>> In other words, I would like the score associated with RES1 to be
>> computed only when RES1 is Started.
>>
>>
>>
>> Is this even possible? If it is, how? If it’s not, then how could I
>> achieve such behavior?
>>
>
> There may be a cleaner way but one option would be to create two Dummy 
> resources - DUM1 DUM2.
> Order RES1 then DUM1, collocate DUM1 with RES1.
> Do the same for DUM2.
> Now collocate your IP with the dummy resources instead of RES.
> Dummy won't be started until RES is started because of the order statement.  
> Then IP will move once Dummy has been placed.

I'd be surprised if this worked.
Collocation constraints only stop the IP from running if we there is
nowhere for DUM1/2 to be active.
At the point we _find_ somewhere to start them, the IP would be
allowed to start too.  The actual starting of DUM1/2 doesn't come into
it.

The only thing that controls start order is... ordering constraints.
You probably want optional ones between the IP and RES1, and the IP and RES2.



>
> Kinda ugly but I think it would be effective.
>
> HTH
>
> Jake
>
>>
>>
>> Thanks!
>>
>> Marcos
>>
>> Sao Paulo – Brazil
>>
>>
>>
>>
>>
>> This email and any files transmitted with it are confidential and
>> intended solely for the use of the individual or entity to whom they
>> are addressed. If you are not the intended recipient, please note
>> that any review, dissemination, disclosure, alteration, printing,
>> circulation, retention or transmission of this e-mail and/or any
>> file or attachment transmitted with it, is prohibited and may be
>> unlawful. If you have received this e-mail or any file or attachment
>> transmitted with it in error please notify postmas...@openet.com.
>> Although Openet has taken reasonable precautions to ensure no
>> viruses are present in this email, we cannot accept responsibility
>> for any loss or damage arising from the use of this email or
>> attachments.
>>
>> _______________________________________________
>> Pacemaker mailing list: Pacemaker@oss.clusterlabs.org
>> 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://bugs.clusterlabs.org
>>
>
> _______________________________________________
> Pacemaker mailing list: Pacemaker@oss.clusterlabs.org
> 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://bugs.clusterlabs.org

_______________________________________________
Pacemaker mailing list: Pacemaker@oss.clusterlabs.org
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://bugs.clusterlabs.org

Reply via email to