[Pacemaker] Problems with configuring colocation and start order

Pavlos Parissis pavlos.parissis at gmail.com
Thu Nov 18 13:13:30 UTC 2010


On 18 November 2010 13:50, Senftleben, Stefan, ITSC
<Stefan.Senftleben at itsc.de> wrote:
> Hello everybody,
>
> I have setup an additional resource „syslogng2mysql“:
>
> primitive syslogng2mysql ocf:heartbeat:anything \
>
>         params binfile="/etc/init.d/syslog2mysql" cmdline_options="start"
> pidfile="/var/run/syslog-ng2mysql.pid" \
>
>         op start timeout="20s" \
>
>         op stop timeout="20s" \
>
>         op monitor interval="30s" timeout="60s" depth="0" \
>
>         meta target-role="Stopped"
>
> That works fine. BUT J I have to setup a colocation to a existing resource
> group “nagios-group”. (please check the output of “crm configure show” at
> the end of the mail)
>
> I tried to setup up a colocation (syslogng2mysql must run on the same node
> like resource group “nagios-group”), but after commiting the setup, the
> resources mailto, nagios, apache2 and ip1 stopped.

only these resources from the group stopped?

> colocation syslogng2mysql_on_nagios-group inf: nagios-group syslogng2mysql
>
> Surely I must configure a order to start the resource “syslogng2mysql” after
> the resource group “nagios group”, but I have no clue how to do it.

the following should work, i don't think you need to specify the start
but I do it in order to read the rule easier.

order nagios-group_then_syslogng2mysql inf: nagios-group:start
syslogng2mysql:start
>
> Could anyone help me, please?
>
> Thanks
>
> Stefan
>
> node lxds05 \
>
>         attributes standby="off"
>
> node lxds07 \
>
>         attributes standby="off"
>
> primitive apache2 ocf:heartbeat:apache \
>
>         params configfile="/services/etc/apache2/apache2.conf"
> httpd="/usr/sbin/apache2" \
>
>         op monitor interval="15s" \
>
>         op start interval="0" timeout="240s" \
>
>         op stop interval="0" timeout="240s"
>
> primitive drbd_disk ocf:linbit:drbd \
>
>         params drbd_resource="nagios" \
>
>         op monitor interval="20s" role="Slave" timeout="240s" \
>
>         op monitor interval="10s" role="Master" timeout="240s"
>
> primitive drbd_disk1 ocf:linbit:drbd \
>
>         params drbd_resource="pnp4nagios" \
>
>         op monitor interval="20s" role="Slave" timeout="240s" \
>
>         op monitor interval="10s" role="Master" timeout="240s"
>
> primitive drbd_disk2 ocf:linbit:drbd \
>
>         params drbd_resource="services" \
>
>         op monitor interval="20s" role="Slave" timeout="240s" \
>
>         op monitor interval="10s" role="Master" timeout="240s"
>
> primitive fs_drbd ocf:heartbeat:Filesystem \
>
>         params device="/dev/drbd0" directory="/usr/local/nagios"
> fstype="ext3" \
>
>         op monitor interval="15s" \
>
>         op start interval="0" timeout="240s" \
>
>         op stop interval="0" timeout="360s"
>
> primitive fs_drbd1 ocf:heartbeat:Filesystem \
>
>         params device="/dev/drbd1" directory="/usr/local/pnp4nagios"
> fstype="ext3" \
>
>         op monitor interval="15s" \
>
>         op start interval="0" timeout="240s" \
>
>         op stop interval="0" timeout="360s"
>
> primitive fs_drbd2 ocf:heartbeat:Filesystem \
>
>         params device="/dev/drbd2" directory="/services/etc" fstype="ext3" \
>
>         op monitor interval="15s" \
>
>         op start interval="0" timeout="240s" \
>
>         op stop interval="0" timeout="360s"
>
> primitive ip1 ocf:heartbeat:IPaddr2 \
>
>         params ip="192.168.1.120" nic="eth5" cidr_netmask="24" \
>
>         op monitor interval="10s" timeout="20s" \
>
>         meta target-role="Started"
>
> primitive mailto ocf:heartbeat:MailTo \
>
>         params email="username at mail.com" \
>
>         op monitor interval="10" timeout="10" depth="0"
>
> primitive nagios ocf:naprax:nagios \
>
>         params configfile="/usr/local/nagios/etc/nagios.cfg"
> nagios="/usr/local/nagios/bin/nagios" \
>
>         op monitor interval="15s" \
>
>         op start interval="0" timeout="240s" \
>
>         op stop interval="0" timeout="240s"
>
> primitive pingd ocf:pacemaker:pingd \
>
>         params host_list="host1 host2 host3 host4" multiplier="100"
> dampen="5s" \
>
>         op monitor interval="15s" timeout="5s"
>
> primitive syslogng ocf:heartbeat:syslog-ng \
>
>         params configfile="/etc/syslog-ng/syslog-ng.conf"
> syslog_ng_binary="/usr/sbin/syslog-ng" \
>
>         op monitor interval="10s" timeout="60s" depth="0"
>
> primitive syslogng2mysql ocf:heartbeat:anything \
>
>         params binfile="/usr/local/scripts/system/syslog-ng2mysql"
> pidfile="/var/run/syslog-ng2mysql.pid" \
>
>         op start interval="0" timeout="20s" \
>
>         op stop interval="0" timeout="20s" \
>
>         op monitor interval="30s" timeout="60s" depth="0" \
>
>         meta target-role="Stopped"
>
> group nagios-group fs_drbd fs_drbd1 fs_drbd2 ip1 apache2 nagios mailto \
>
>         meta target-role="Started"
>
> ms ms_drbd drbd_disk \
>
>         meta master-max="1" master-node-max="1" clone-max="2"
> clone-node-max="1" notify="true" target-role="Started"
>
> ms ms_drbd1 drbd_disk1 \
>
>         meta master-max="1" master-node-max="1" clone-max="2"
> clone-node-max="1" notify="true"
>
> ms ms_drbd2 drbd_disk2 \
>
>         meta master-max="1" master-node-max="1" clone-max="2"
> clone-node-max="1" notify="true"
>
> clone pingdclone pingd \
>
>         meta globally-unique="false" target-role="Started"
>
> clone syslogng-clone syslogng \
>
>         meta globally-unique="false" target-role="Started"
>
> location cli-prefer-ip1 nagios-group \
>
>         rule $id="cli-prefer-rule-ip1" inf: #uname eq lxds07 and #uname eq
> lxds05
>
> location nagios-group_on_connected_node nagios-group \
>
>         rule $id="pingd-rule" pingd: defined pingd
>
> colocation drbd_on_disks inf: ms_drbd ms_drbd1 ms_drbd2 nagios-group
>
> colocation syslogng2mysql_on_nagios-group inf: nagios-group syslogng2mysql

where is the colocation for start fs resource on the Master ms-drbd?
You need to make sure that the fs_drbd1 and fs_drbd2 run on node with
the role master for ms_drbd1 and ms_drbd2.

>
> order mount_after_drbd inf: ms_drbd:promote nagios-group:start
>
> order mount_after_drbd1 inf: ms_drbd1:promote nagios-group:start
>
> order mount_after_drbd2 inf: ms_drbd2:promote nagios-group:start
>
> property $id="cib-bootstrap-options" \
>
>         dc-version="1.0.8-042548a451fce8400660f6031f4da6f0223dd5dd" \
>
>         cluster-infrastructure="openais" \
>
>         expected-quorum-votes="2" \
>
>         stonith-enabled="false" \
>
>         no-quorum-policy="ignore"
>
> rsc_defaults $id="rsc-options" \
>
>         resource-stickiness="100"
>
> _______________________________________________
> 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