pacemaker can't start my zabbix service when i stop zabbix sevice -
i want use corosync+pacemaker+zabbix achieve high availability.follow config
crm(live)configure# show node zabbix1 \ attributes standby="off" timeout="60" node zabbix2 \ attributes standby="off" primitive httpd lsb:httpd \ op monitor interval="10s" primitive vip ocf:heartbeat:ipaddr \ params ip="192.168.56.110" nic="eth0" cidr_netmask="24" \ op monitor interval="10s" primitive zabbix-ha lsb:zabbix_server \ op monitor interval="30s" timeout="20s" \ op start interval="0s" timeout="40s" \ op stop interval="0s" timeout="60s" group webservice vip httpd zabbix-ha property $id="cib-bootstrap-options" \ dc-version="1.1.8-7.el6-394e906" \ cluster-infrastructure="classic openais (with plugin)" \ expected-quorum-votes="2" \ stonith-enabled="false" \ last-lrm-refresh="1377489711" \ no-quorum-policy="ignore" rsc_defaults $id="rsc-options" \ resource-stickiness="100"
and crm_mon status last updated: mon aug 26 18:52:48 2013 last change: mon aug 26 18:52:33 2013 via cibadmin on zabbix1 stack: classic openais (with plugin) current dc: zabbix1 - partition quorum version: 1.1.8-7.el6-394e906 2 nodes configured, 2 expected votes 3 resources configured.
node zabbix1: online httpd (lsb:httpd): started vip (ocf::heartbeat:ipaddr): started zabbix-ha (lsb:zabbix_server): started node zabbix2: online
now stop zabbix-ha service on zabbix1,i wait 300s,pacemaker can't start zabbix-ha service. [root@zabbix1 tmp]# ps -ef|grep zabbix root 13287 31252 0 18:59 pts/2 00:00:00 grep zabbix , zabbix-ha script can use crm resource stop/start zabbix-ha stop/start zabbix-ha. can me solve problem?
i'm not use zabbix default script(address zabbix-2.0.6/misc/init.d/fedora/core/zabbix_serve),i create lsb script myself.follow script zabbix_server(i put in /etc/init.d)
#!/bin/bash # # zabbix: control zabbix daemon # # author: denglei # # blog: http://dl528888.blog.51cto.com/ # description: init.d script zabbix. tested on centos6. \ # change daemon , pidfile if neccessary. # #location of zabbix binary. change path neccessary daemon=/usr/local/zabbix/sbin/zabbix_server name=`basename $daemon` #pid file of zabbix, should matched pid directive in nginx config file. pidfile=/tmp/$name.pid #this file location scriptname=/etc/init.d/$name #only run if binary can found test -x $daemon || exit 0 retval=0 start() { echo $"starting $name" $daemon retval=0 } stop() { echo $"graceful stopping $name" [ -s "$pidfile" ] && kill -quit `cat $pidfile` retval=0 } forcestop() { echo $"quick stopping $name" [ -s "$pidfile" ] && kill -term `cat $pidfile` retval=$? } reload() { echo $"graceful reloading $name configuration" [ -s "$pidfile" ] && kill -hup `cat $pidfile` retval=$? } status() { if [ -s $pidfile ]; echo $"$name running." retval=0 else echo $"$name stopped." retval=3 fi } # see how called. case "$1" in start) start ;; stop) stop ;; force-stop) forcestop ;; restart) stop start ;; reload) reload ;; status) status ;; *) echo $"usage: $0 {start|stop|force-stop|restart|reload|status}" exit 1 esac exit $retval </pre>
Comments
Post a Comment