On 26 November 2010 14:52, Kris Buytaert <m...@inuits.be> wrote:
>
>
> Imagine that I have 3 resources.  d_A, d_B and d_C.   They all have to
> run together on the same node however I want the behaviour upon failure
> of a service to be different.
Define failure? Failure to stop or start or monitor

> If primitive d_A and d_B fail I want the
> whole group to fail to another node.  If primitive d_C fails I just want
> it to restart.
>
> So first of all , is this possible ? :)
Yes I have it like this on my system and it works, take a look at my
conf at the bottom and specifically sshd_01 resource
>
> At first I had my rsc_defaults migration-treshold set to 1 and changed
> the value for the primitive d_C to infinity,  however upon failing d_C
> all resource migrated to the other node rather than just having d_C
> restarted on the same node.
You mean before you reached migration-threshold, that is strange.

>
> So I inverted my logic to by default restart all resources on the same
> node, however this makes me wonder if the resource specific parameters
> overrule the default ones or not.
They do.

>
>
> property $id="cib-bootstrap-options" \
>        stonith-enabled="FALSE" \
>        no-quorum-policy=ignore \
>        start-failure-is-fatal="FALSE" \
>        pe-error-series-max="9" \
>        pe-warn-series-max="9" \
>        pe-input-series-max="9"
> rsc_defaults $id="rsc_defaults-options" \
>        migration-threshold="1" \
>        failure-timeout="10" \
>        resource-stickiness="INFINITY"
> primitive d_A lsb:A \
>        op monitor interval="10s"
> primitive d_B lsb:B \
>        op monitor interval="10s"
> primitive d_C ocf:ntc:tomcat \
>        params instance_name="MSS" \
>        monitor_urls="" \
>        monitor_use_ssl="no" \
>        op monitor interval="15s" \
>        on-fail="restart" \
>        migration-treshold="INFINITY"
this should be migration-threshold :-)
Did you run verify before commit? I am surprised that it was accepted it by crm.

>        timeout="30s"
> primitive ip_A ocf:heartbeat:IPaddr2 \
>        params ip="<%= serviceIP %>" cidr_netmask="<%= servicePrefix %>"
> nic="<%= serviceDevice %>" \
>        op monitor interval="10s"
> group svc-ABC  d_A d_B d_C  ip_A
> commit
>
>
>
> Or shouldn't I be using group to group them ?
>
>
> greetings
>
> Kris
>
>
> _______________________________________________
> 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
>


node $id="1db957ef-20b5-43e0-84f7-f3224a7084bc" pbxsrv2
node $id="3f4fcfc7-8da5-4d9c-87a9-01e65e16d44f" pbxsrv3
node $id="8f04b98f-fbe3-479f-bbea-e078d65b2de4" pbxsrv1
primitive drbd_01 ocf:linbit:drbd \
        params drbd_resource="drbd_resource_01" \
        op monitor interval="30s" \
        op start interval="0" timeout="240s" \
        op stop interval="0" timeout="120s"
primitive drbd_02 ocf:linbit:drbd \
        params drbd_resource="drbd_resource_02" \
        op monitor interval="30s" \
        op start interval="0" timeout="240s" \
        op stop interval="0" timeout="120s"
primitive fs_01 ocf:heartbeat:Filesystem \
        params device="/dev/drbd1" directory="/pbx_service_01" fstype="ext3" \
        meta migration-threshold="3" failure-timeout="60" \
        op monitor interval="20s" timeout="40s" OCF_CHECK_LEVEL="20" \
        op start interval="0" timeout="60s" \
        op stop interval="0" timeout="60s"
primitive fs_02 ocf:heartbeat:Filesystem \
        params device="/dev/drbd2" directory="/pbx_service_02" fstype="ext3" \
        meta migration-threshold="3" failure-timeout="60" \
        op monitor interval="20s" timeout="40s" OCF_CHECK_LEVEL="20" \
        op start interval="0" timeout="60s" \
        op stop interval="0" timeout="60s"
primitive ip_01 ocf:heartbeat:IPaddr2 \
        params ip="192.168.78.10" nic="eth3" cidr_netmask="24"
broadcast="192.168.78.255" \
        meta failure-timeout="120" migration-threshold="3" \
        op monitor interval="5s"
primitive ip_02 ocf:heartbeat:IPaddr2 \
        params ip="192.168.78.30" nic="eth3" cidr_netmask="24"
broadcast="192.168.78.255" \
        meta failure-timeout="120" migration-threshold="3" \
        op monitor interval="5s"
primitive mailAlert_01 ocf:heartbeat:MailTo \
        params email="root" subject="[Zanadoo Clustet event] pbx_service_01" \
        op monitor interval="2" timeout="10" \
        op start interval="0" timeout="10" \
        op stop interval="0" timeout="10"
primitive mailAlert_02 ocf:heartbeat:MailTo \
        params email="root" subject="[Zanadoo Clustet event] pbx_service_02" \
        op monitor interval="2" timeout="10" \
        op start interval="0" timeout="10" \
        op stop interval="0" timeout="10"
primitive pbx_01 lsb:znd-pbx_01 \
        meta migration-threshold="3" failure-timeout="60"
target-role="Started" \
        op monitor interval="20s" timeout="20s" \
        op start interval="0" timeout="60s" \
        op stop interval="0" timeout="60s"
primitive pbx_02 lsb:znd-pbx_02 \
        meta migration-threshold="3" failure-timeout="60"
target-role="Started" \
        op monitor interval="20s" timeout="15s" \
        op start interval="0" timeout="60s" \
        op stop interval="0" timeout="60s"
primitive sshd_01 lsb:znd-sshd-pbx_01 \
        op monitor on-fail="restart" interval="10m" \
        op start interval="0" timeout="60s" on-fail="stop" \
        op stop interval="0" timeout="60s" on-fail="stop"
primitive sshd_02 lsb:znd-sshd-pbx_02 \
        op monitor on-fail="stop" interval="10m" \
        op start interval="0" timeout="60s" on-fail="stop" \
        op stop interval="0" timeout="60s" on-fail="stop"
group pbx_service_01 ip_01 fs_01 pbx_01 sshd_01 mailAlert_01 \
        meta target-role="Started"
group pbx_service_02 ip_02 fs_02 pbx_02 sshd_02 mailAlert_02 \
        meta target-role="Started"
ms ms-drbd_01 drbd_01 \
        meta master-max="1" master-node-max="1" clone-max="2"
clone-node-max="1" notify="true" target-role="Started"
ms ms-drbd_02 drbd_02 \
        meta master-max="1" master-node-max="1" clone-max="2"
clone-node-max="1" notify="true" target-role="Started"
location PrimaryNode-drbd_01 ms-drbd_01 100: pbxsrv1
location PrimaryNode-drbd_02 ms-drbd_02 100: pbxsrv2
location PrimaryNode-pbx_service_01 pbx_service_01 200: pbxsrv1
location PrimaryNode-pbx_service_02 pbx_service_02 200: pbxsrv2
location SecondaryNode-drbd_01 ms-drbd_01 0: pbxsrv3
location SecondaryNode-drbd_02 ms-drbd_02 0: pbxsrv3
location SecondaryNode-pbx_service_01 pbx_service_01 10: pbxsrv3
location SecondaryNode-pbx_service_02 pbx_service_02 10: pbxsrv3
colocation fs_01-on-drbd_01 inf: fs_01 ms-drbd_01:Master
colocation fs_02-on-drbd_02 inf: fs_02 ms-drbd_02:Master
order pbx_service_01-after-drbd_01 inf: ms-drbd_01:promote pbx_service_01:start
order pbx_service_02-after-drbd_02 inf: ms-drbd_02:promote pbx_service_02:start
property $id="cib-bootstrap-options" \
        dc-version="1.0.10-da7075976b5ff0bee71074385f8fd02f296ec8a3" \
        cluster-infrastructure="Heartbeat" \
        symmetric-cluster="false" \
        stonith-enabled="false"
rsc_defaults $id="rsc-options" \
        resource-stickiness="1000"
_______________________________________________
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

Reply via email to