Mailing List Archive

how to configure cluster to do not run resources simultaneously
pacemaker-1.1.11-0.7.53
corosync-1.4.7-0.19.6

resource 'app2' depends on 'app1', i.e without app1, app2 can't run.

resource 'app1' is configured to run on node1, while app2 is configured
to run on node2 via location rules.

cluster is configured to never start the app2 atop node1.

I don't want to run both the resources on node2 simultaneously. How can
I configure the cluster to do not run
the app2 on the node2 when cluster has to run the app1 atop node2(due to
failure/unavailability of node1)

Help me how can I achieve this.

--
Regards,

Muhammad Sharfuddin


_______________________________________________
Linux-HA mailing list
Linux-HA@lists.linux-ha.org
http://lists.linux-ha.org/mailman/listinfo/linux-ha
See also: http://linux-ha.org/ReportingProblems
Re: how to configure cluster to do not run resources simultaneously [ In reply to ]
Hi,

On Fri, Feb 06, 2015 at 10:28:36AM +0500, Muhammad Sharfuddin wrote:
> pacemaker-1.1.11-0.7.53
> corosync-1.4.7-0.19.6
>
> resource 'app2' depends on 'app1', i.e without app1, app2 can't run.
>
> resource 'app1' is configured to run on node1, while app2 is
> configured to run on node2 via location rules.
>
> cluster is configured to never start the app2 atop node1.
>
> I don't want to run both the resources on node2 simultaneously. How
> can I configure the cluster to do not run
> the app2 on the node2 when cluster has to run the app1 atop
> node2(due to failure/unavailability of node1)

Use a negative collocation constraint (probably with -inf) for
the two resources, that way the cluster will never collocate
them. You also need to make sure that app1 always has a higher
score than app2.

Thanks,

Dejan



> Help me how can I achieve this.
>
> --
> Regards,
>
> Muhammad Sharfuddin
>
>
> _______________________________________________
> Linux-HA mailing list
> Linux-HA@lists.linux-ha.org
> http://lists.linux-ha.org/mailman/listinfo/linux-ha
> See also: http://linux-ha.org/ReportingProblems
_______________________________________________
Linux-HA mailing list
Linux-HA@lists.linux-ha.org
http://lists.linux-ha.org/mailman/listinfo/linux-ha
See also: http://linux-ha.org/ReportingProblems
Re: how to configure cluster to do not run resources simultaneously [ In reply to ]
On 02/09/2015 04:56 PM, Dejan Muhamedagic wrote:
> Hi,
>
> On Fri, Feb 06, 2015 at 10:28:36AM +0500, Muhammad Sharfuddin wrote:
>> pacemaker-1.1.11-0.7.53
>> corosync-1.4.7-0.19.6
>>
>> resource 'app2' depends on 'app1', i.e without app1, app2 can't run.
>>
>> resource 'app1' is configured to run on node1, while app2 is
>> configured to run on node2 via location rules.
>>
>> cluster is configured to never start the app2 atop node1.
>>
>> I don't want to run both the resources on node2 simultaneously. How
>> can I configure the cluster to do not run
>> the app2 on the node2 when cluster has to run the app1 atop
>> node2(due to failure/unavailability of node1)
>
> Use a negative collocation constraint (probably with -inf) for
> the two resources, that way the cluster will never collocate
> them.
>
Yup I got this advise from Mr. Alain, and it works perfectly, thanks
a lot.

colocation app1-app2-neverOnSameNode -inf: app1 app2

>You also need to make sure that app1 always has a higher
> score than app2.
>
yes I have two location rules for this
location app1-node1 app1 inf: node1
location app2-node2 app2 inf: node2


>
> Thanks,
>
> Dejan
>
>
>> Help me how can I achieve this.
>>
>> --
>> Regards,
>>
>> Muhammad Sharfuddin
>>
>>
>> _______________________________________________
>> Linux-HA mailing list
>> Linux-HA@lists.linux-ha.org
>> http://lists.linux-ha.org/mailman/listinfo/linux-ha
>> See also: http://linux-ha.org/ReportingProblems
> _______________________________________________
> Linux-HA mailing list
> Linux-HA@lists.linux-ha.org
> http://lists.linux-ha.org/mailman/listinfo/linux-ha
> See also: http://linux-ha.org/ReportingProblems
>
--
Regards,

Muhammad Sharfuddin

_______________________________________________
Linux-HA mailing list
Linux-HA@lists.linux-ha.org
http://lists.linux-ha.org/mailman/listinfo/linux-ha
See also: http://linux-ha.org/ReportingProblems