[Pacemaker] How to prevent restart of a resource?

Adrian Fita adrian.fita at gmail.com
Fri Feb 24 08:10:59 UTC 2012


On Fri, Feb 24, 2012 at 01:37, Andrew Beekhof <andrew at beekhof.net> wrote:
> On Thu, Feb 16, 2012 at 2:57 AM, Adrian Fita <adrian.fita at gmail.com> wrote:
>> Hi.
>>
>> This is related to the previous email, "Advisory ordering on clones
>> not working", http://oss.clusterlabs.org/pipermail/pacemaker/2012-February/013119.html.
>> I read some more about advisory ordering and it seems it's not what
>> I'm looking for. Advisory ordering gets activated _only and only if
>> both resources need to start at the same time_, so I guess the
>> behaviour I am experiencing is how it should work.
>>
>> Given the configuration below, I would like for the
>> p_fs_nfs_config_nocmc1 resource to not get restarted after one of the
>> storage nodes failure. It seems that symmetrical=false doesn't help,
>> the resource still gets restarted. The reason for this is I need the
>> NFS client mount to not be touched so that the processes using that
>> mount don't fail.
>
> I think you want the (just fixed today) asymmetrical ordering constraints.
>   http://bugs.clusterlabs.org/show_bug.cgi?id=5014

Right. That looks like what I'm experiencing also.

I'll go ahead and build the latest GIT version to see if it works now
as intended and let you know.

> Ie. Don't start the clients until the server is up, but don't bring
> them down if the server dies.
>
> Something like that?

Yes, this is what I'm after.

>> node nocmc1-cos6-2
>> node nocmc2-cos6-2
>> node nocms1-cos6-2 \
>>        attributes standby="off" type="storage"
>> node nocms2-cos6-2 \
>>        attributes standby="off" type="storage"
>> primitive p_drbd_config ocf:linbit:drbd \
>>        params drbd_resource="config" \
>>        op monitor interval="15" role="Master" \
>>        op monitor interval="30" role="Slave"
>> primitive p_exportfs_config ocf:heartbeat:exportfs \
>>        params directory="/mnt/config" fsid="1"
>> options="rw,no_root_squash,mountpoint=/mnt/config"
>> clientspec="10.1.0.0/255.255.0.0" unlock_on_stop="true" \
>>        op stop interval="0" timeout="15s"
>> primitive p_exportfs_root ocf:heartbeat:exportfs \
>>        params directory="/mnt" fsid="0"
>> options="rw,crossmnt,no_root_squash" clientspec="10.1.0.0/255.255.0.0"
>> unlock_on_stop="true" \
>>        op stop interval="0" timeout="15s"
>> primitive p_fs_config ocf:heartbeat:Filesystem \
>>        params device="/dev/drbd/by-res/config"
>> directory="/mnt/config" fstype="ext4" \
>>        op monitor interval="10s"
>> primitive p_fs_nfs_config_nocmc1 ocf:idirect:Filesystem \
>>        params fstype="nfs" device="10.1.11.186:/mnt/config"
>> directory="/nfs/config" options="noatime" \
>>        op start interval="0" timeout="60s" \
>>        op stop interval="0" timeout="60s" \
>>        op monitor interval="30s" timeout="60s" \
>>        meta failure-timeout="120s"
>> primitive p_ip_nfs ocf:heartbeat:IPaddr2 \
>>        params ip="10.1.11.186" cidr_netmask="16" \
>>        op monitor interval="30s"
>> primitive p_nfsserver ocf:heartbeat:nfsserver \
>>        params nfs_init_script="/etc/init.d/nfs"
>> nfs_notify_cmd="/usr/sbin/sm-notify"
>> nfs_shared_infodir="/mnt/config/nfs_infodir" nfs_ip="10.1.11.186" \
>>        op monitor interval="10s" \
>>        op start interval="0" timeout="40s"
>> ms ms_drbd_config p_drbd_config \
>>        meta master-max="1" master-node-max="1" clone-max="2"
>> clone-node-max="1" notify="true"
>> location l_ms_drbd_config_only_on_storage ms_drbd_config \
>>        rule $id="l_ms_drbd_config_only_on_storage-rule" -inf: type ne storage
>> location l_p_fs_nfs_config_nocmc1_only_on_nocmc1
>> p_fs_nfs_config_nocmc1 inf: nocmc1-cos6-2
>> location l_p_ip_nfs_only_on_storage p_ip_nfs \
>>        rule $id="l_p_ip_nfs_only_on_storage-rule" -inf: type ne storage
>> colocation c_fs_config_with_drbd_config inf: p_fs_config ms_drbd_config:Master
>> colocation c_ms_drbd_with_ip_nfs inf: ms_drbd_config:Master p_ip_nfs
>> colocation c_p_exportfs_p_exportfs_root inf: p_exportfs_config p_exportfs_root
>> colocation c_p_exportfs_root_p_nfsserver inf: p_exportfs_root p_nfsserver
>> colocation c_p_nfsserver_p_fs inf: p_nfsserver p_fs_config
>> order o_ms_drbd_config_p_fs_config inf: ms_drbd_config:promote p_fs_config:start
>> order o_p_exportfs_config_p_fs_nfs_config_nocmc1 inf:
>> p_exportfs_config p_fs_nfs_config_nocmc1 symmetrical=false
>> order o_p_exportfs_root_p_exportfs inf: p_exportfs_root p_exportfs_config
>> order o_p_fs_p_nfsserver inf: p_fs_config p_nfsserver
>> order o_p_ip_nfs_ms_drbd_config inf: p_ip_nfs:start ms_drbd_config:promote
>> order o_p_nfsserver_p_exportfs_root inf: p_nfsserver p_exportfs_root
>> property $id="cib-bootstrap-options" \
>>        dc-version="1.1.6-3.el6-a02c0f19a00c1eb2527ad38f146ebc0834814558" \
>>        cluster-infrastructure="openais" \
>>        expected-quorum-votes="4" \
>>        stonith-enabled="false" \
>>        no-quorum-policy="ignore" \
>>        stop-all-resources="false" \
>>        maintenance-mode="false" \
>>        last-lrm-refresh="1329319153"
>> rsc_defaults $id="rsc-options" \
>>        resource-stickiness="200"
>>
>> --
>> Fita Adrian
>>
>> _______________________________________________
>> 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://bugs.clusterlabs.org
>
> _______________________________________________
> 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://bugs.clusterlabs.org




More information about the Pacemaker mailing list