[Pacemaker] Resource is running only on one node, even if the node is not available anymore

Thomas Baumann bt047265 at gmail.com
Tue Mar 1 10:55:16 CET 2011


Hello Lars,

thanks a lot for your hint. Double negation is the smartest way ;)

regards,

Thomas

On Mon, Feb 28, 2011 at 9:36 PM, Lars Ellenberg
<lars.ellenberg at linbit.com> wrote:
> On Mon, Feb 28, 2011 at 07:59:30PM +0100, Thomas Baumann wrote:
>> Hello,
>>
>> I tried to stick a group fixed to one node, but if the service
>> corosync is stopped the group is jumping to the next node.
>>
>> Here is my configuration:
>>
>> <rsc_location id="loc_lb1" rsc="group_lb1" node="m-lab-prx-lb-1"
>> score="INFINITY"/>
>>
>> How I can configure that behavior that my group is running only in
>> that specific host ?
>
> I really like the crm shell.
> And I like the double negation trick:
>
>        crm configure location X-on-and-ONLY-on-Y X rule -inf: \#uname ne Y
>
> (the \ is for the shell, not for the crm shell,
>  but it does not hurt in the crm shell either).
>
> The xml produced by this is
>
>        <rsc_location id="X-on-and-ONLY-on-Y" rsc="X">
>          <rule id="X-on-and-ONLY-on-Y-rule" score="-INFINITY">
>            <expression attribute="#uname" id="X-on-and-ONLY-on-Y-expression" operation="ne" value="Y"/>
>          </rule>
>        </rsc_location>
>
> The idea is to absolutely forbid (-inf) the resource X to run,
> unless it runs on #uname Y (rule is only valid for #uname NOT EQUAL Y).
>
> Cheers,
>
> --
> : Lars Ellenberg
> : LINBIT | Your Way to High Availability
> : DRBD/HA support and consulting http://www.linbit.com
>
> _______________________________________________
> Pacemaker mailing list: Pacemaker at 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://developerbugs.linux-foundation.org/enter_bug.cgi?product=Pacemaker
>



More information about the Pacemaker mailing list