[Pacemaker] syslog-ng as resource / how to make sure it gets restarted

Andrew Beekhof andrew at beekhof.net
Thu Oct 7 07:31:35 UTC 2010


On Fri, Oct 1, 2010 at 9:41 AM, Koch, Sebastian
<Sebastian.Koch at netzwerk.de> wrote:
> Hi Andrew,
>
>
>
> thanks for your answer. I still need syslog-ng to restart on all nodes after
> the ClusterIp moved. I tried it like this:
>
>
>
>
>
>
>
> Resource:
>
> primitive res_SyslogNG lsb:syslog-ng \
>
>         op monitor interval="15s" timeout="20s" start-delay="15s"
>
>
>
> Clone:
>
> clone cl-SyslogNG res_SyslogNG \
>
>         meta globally-unique="false"
>
>
>
> Order:
>
> order syslogng_after_clusterip inf: res_ClusterIP cl-SyslogNG

I think you'll have more luck with the 1.1 series for this.
We recently redesigned the ordering logic and I believe this should work now.

>
>
>
>
>
> Full Config:
>
>
>
>
>
> node pilot01-node1 \
>
>         attributes standby="off"
>
> node pilot01-node2 \
>
>         attributes standby="off"
>
> primitive Monitor-Cluster ocf:pacemaker:ClusterMon \
>
>         params htmlfile="/mnt/cluster/var/www/cluster-monitor.html" \
>
>         params pidfile="/var/run/rlb-cluster-monitor.pid" \
>
>         op start interval="0" timeout="90s" \
>
>         op stop interval="0" timeout="100s"
>
> primitive drbd_pilot0 ocf:linbit:drbd \
>
>         params drbd_resource="pilot0" drbdconf="/usr/local/etc/drbd.conf" \
>
>         operations $id="drbd_pilot0-operations" \
>
>         op monitor interval="15s"
>
> primitive pinggw ocf:pacemaker:pingd \
>
>         params host_list="10.1.1.162" multiplier="200" \
>
>         op monitor interval="10s"
>
> primitive res_Apache lsb:apache2 \
>
>         operations $id="res_Apache-operations" \
>
>         op monitor interval="15s" timeout="20s" start-delay="15s" \
>
>         meta is-managed="true" target-role="Started"
>
> primitive res_ClusterIP ocf:heartbeat:IPaddr2 \
>
>         params iflabel="ClusterIP" ip="10.1.1.12" nic="eth0"
> cidr_netmask="24" \
>
>         operations $id="res_ClusterIP_1-operations" \
>
>         op monitor start-delay="0" interval="10s" \
>
>         meta target-role="Started"
>
> primitive res_ClusterMonitor ocf:pacemaker:ClusterMon \
>
>         params htmlfile="/mnt/cluster/var/www/cluster-monitor.html" \
>
>         params pidfile="/var/run/rlb-cluster-monitor.pid"
>
> primitive res_Filesystem ocf:heartbeat:Filesystem \
>
>         params fstype="xfs" directory="/mnt/cluster" device="/dev/drbd0"
> options="noatime,nodiratime,barrier=0"
>
> primitive res_JasperServer lsb:jasperserver \
>
>         op monitor interval="15s" timeout="20s" start-delay="15s"
>
> primitive res_MySQL lsb:mysql \
>
>         op start interval="0" timeout="120" \
>
>         op stop interval="0" timeout="120" \
>
>         op monitor interval="10" timeout="30" depth="0"
>
> primitive res_Nagios lsb:nagios3 \
>
>         operations $id="res_Nagios-operations" \
>
>         op monitor interval="15s" timeout="20s"
>
> primitive res_ProLog2Db lsb:prolog2db \
>
>         op monitor interval="15s" timeout="20s" start-delay="15s"
>
> primitive res_ProLog2File lsb:prolog2file \
>
>         op monitor interval="15s" timeout="20s" start-delay="15s" \
>
>         meta target-role="Started"
>
> primitive res_ProLogWeb lsb:prolog-web \
>
>         op monitor interval="15s" timeout="20s" start-delay="15s"
>
> primitive res_SyslogNG lsb:syslog-ng \
>
>         op monitor interval="15s" timeout="20s" start-delay="15s"
>
> group grp_MySQL res_Filesystem res_ClusterIP res_ProLog2File res_MySQL
> res_ProLog2Db res_Apache res_ClusterMonitor res_Nagios res_ProLogWeb
> res_JasperServer \
>
>         meta target-role="Started"
>
> ms ms_drbd_mysql0 drbd_pilot0 \
>
>         meta master-max="1" master-node-max="1" clone-max="2"
> clone-node-max="1" notify="true" target-role="Started"
>
> clone cl-SyslogNG res_SyslogNG \
>
>         meta globally-unique="false"
>
> clone cl-pinggw pinggw \
>
>         meta globally-unique="false"
>
> location grp_MySQL-with-pinggw grp_MySQL \
>
>         rule $id="grp_MySQL-with-pinggw-rule-1" -inf: not_defined pingd or
> pingd lte 0
>
> colocation col_drbd_on_mysql inf: grp_MySQL ms_drbd_mysql0:Master
>
> order mysql_after_drbd inf: ms_drbd_mysql0:promote grp_MySQL:start
>
> order syslogng_after_clusterip inf: res_ClusterIP cl-SyslogNG
>
> property $id="cib-bootstrap-options" \
>
>         expected-quorum-votes="2" \
>
>         stonith-enabled="false" \
>
>         no-quorum-policy="ignore" \
>
>         dc-version="1.0.8-2c98138c2f070fcb6ddeab1084154cffbf44ba75" \
>
>         cluster-infrastructure="openais" \
>
>         last-lrm-refresh="1285872257" \
>
>         symmetric-cluster="true" \
>
>         default-action-timeout="240s"
>
>
>
>
>
> Thanks in advance.
>
>
>
> Sebastian Koch
>
>
> NETZWERK GmbH
>
> Fon:  +49.711.220 5498 81
> Achtung neue Mobilfunknummer: +49.1522.299 6524
> Fax:  +49.711.220 5499 77
> Email: sebastian.koch at netzwerk.de
> Web:  www.netzwerk.de
>
> NETZWERK GmbH, Kurze Str. 40, 70794 Filderstadt-Bonlanden
> Geschäftsführer: Siegfried Herner, Hans-Baldung Luley, Olaf Müller-Haberland
> Sitz der Gesellschaft: Filderstadt-Bonlanden, Amtsgericht Stuttgart HRB
> 225547, WEEE-Reg Nr. DE 185 622 492
>
>
>
> _______________________________________________
> 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