[Pacemaker] Problems with configuring colocation and start order
Senftleben, Stefan, ITSC
Stefan.Senftleben at ITSC.de
Thu Nov 18 12:50:01 UTC 2010
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 :-) 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.
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.
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
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"
-------------- n?chster Teil --------------
Ein Dateianhang mit HTML-Daten wurde abgetrennt...
URL: <http://oss.clusterlabs.org/pipermail/pacemaker/attachments/20101118/3dc8aa47/attachment-0001.htm>
More information about the Pacemaker
mailing list