[Pacemaker] Problems with configuring colocation and start order
Senftleben, Stefan, ITSC
Stefan.Senftleben at ITSC.de
Thu Nov 18 13:53:57 UTC 2010
hi!
I made these changes to the cib:
colocation syslogng2mysql_on_nagios-group inf: nagios-group syslogng2mysql
order nagios-group_then_syslogng2mysql inf: nagios-group:start syslogng2mysql:start
Then went one by one the resource of resource group "nagios-group" down, only "fs_drbd1" and "fs_drbd" were started.
Maybe the whole resource group was going down, but the stop timeout values (360s) could lengthened the resource-group stop process.
After that the resource group and the new service (in correct order) started. -> very good!
The test "crm resource stop syslogng2mysql" stopped the resource, and again, the resource group. why?
And in syslog I found that the lrmd tried to start the resource "syslogng2mysql" on the other node, that did not was master of resource-group "nagios-group".
-----Ursprüngliche Nachricht-----
Von: Pavlos Parissis [mailto:pavlos.parissis at gmail.com]
Gesendet: Donnerstag, 18. November 2010 14:14
An: The Pacemaker cluster resource manager
Betreff: Re: [Pacemaker] Problems with configuring colocation and start order
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=Pacema
> ker
>
>
_______________________________________________
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