hi~ ,thanks
i found it works well after i copy the script to all machines
first,is there need to have all script in all machine?
if some machine only run tomcat ,some only run squid ,some only run httpd ,
one tomcat server should has squid script and httpd script after all.
even i try to score it in location not to run httpd or squid.

yes? every workers should have all skills even only to one kind of job.


2010/1/20 Andrew Beekhof <and...@beekhof.net>

> On Fri, Jan 15, 2010 at 7:23 AM, 梁景明 <futur...@gmail.com> wrote:
> > hi ,there are 4 cases in my application to use pacemaker
> > case 1: one tomcat unexpected down ,restart it by pacemaker.
> > case 2: one tomcat served machine unexpected down ,fail over to another
> > machine,back if it recover.
> > case 3: some tomcat only run on some special nodes ,the others cant
> monitor
> > it.
> > case 4: one server application runs only after some application started ,
> it
> > means runs by order.
> >
> > first i try to exam case 1.
> > i built a 4 nodes environment to test it ,and standby three nodes .like
> this
> >
> > ============
> > Last updated: Fri Jan 15 11:57:49 2010
> > Stack: openais
> > Current DC: bak1 - partition with quorum
> > Version: 1.0.5-3840e6b5a305ccb803d29b468556739e75532d56
> > 4 Nodes configured, 4 expected votes
> > 1 Resources configured.
> > ============
> >
> > Node bak1: standby
> > Node test1: standby
> > Node test2: standby
> > Online: [ ubuntu ]
> >
> > and tomcat lsb script i use the example from the doc on wiki. it started
> on
> > node ubuntu like this "*sudo sh /etc/init.d/tomcatpace start*" no
> problem.
> > crm configure :
> >
> > node bak1 \
> >    attributes standby="on"
> > node test1 \
> >    attributes standby="on"
> > node test2 \
> >    attributes standby="on"
> > node ubuntu
> > primitive tomcat lsb:tomcatpace \
> >    op monitor interval="10" timeout="30s" \
> >    meta migration-threshold="10" target-role="Started"
> >
> > first i think only ubuntu is online ,so the script only run on ubuntu ,is
> it
> > right?
> > but it fails .it seems to be all the nodes running the script.
> >
> > Node bak1: standby
> > Node test1: standby
> > Node test2: standby
> > Online: [ ubuntu ]
> >
> > tomcat    (lsb:tomcatpace) Started [    bak1    test1    test2 ]
> >
> > Failed actions:
> >    tomcat_monitor_0 (node=bak1, call=2, rc=254, status=complete):
> <unknown>
> >    tomcat_stop_0 (node=bak1, call=3, rc=254, status=complete): <unknown>
> >    tomcat_monitor_0 (node=test1, call=2, rc=254, status=complete):
> > <unknown>
> >    tomcat_stop_0 (node=test1, call=3, rc=254, status=complete): <unknown>
> >    tomcat_monitor_0 (node=test2, call=2, rc=254, status=complete):
> > <unknown>
> >    tomcat_stop_0 (node=test2, call=3, rc=254, status=complete): <unknown>
>
> Have a look at:
>   http://clusterlabs.org/wiki/FAQ#Resource_is_Too_Active
>
> In your case, the failed actions indicate the script is not LSB compliant:
>
> http://www.clusterlabs.org/doc/en-US/Pacemaker/1.0/html/Pacemaker_Explained/ap-lsb.html
>
> First thing to do before trying anything else is to fix the script.
>
> >
> > then i added location rule ,but i am not sure about the usage of it ,so
>  i
> > followed the example .
> >
> > location prefer-ubuntu tomcat \
> >        rule $id="prefer-rule" 100: #uname eq ubuntu
> >
> > is the line to prefer ubuntu node ,and only run on that node ? current
> > configure :
> >
> > node bak1 \
> >        attributes standby="on"
> > node test1 \
> >        attributes standby="on"
> > node test2 \
> >        attributes standby="on"
> > node ubuntu
> > primitive tomcat lsb:tomcatpace \
> >        op monitor interval="10" timeout="30s" \
> >        meta migration-threshold="10" target-role="Started"
> > location prefer-ubuntu tomcat \
> >        rule $id="prefer-rule" 100: #uname eq ubuntu
> >
> > but it fails again
> >
> > Node bak1: standby
> > Node test1: standby
> > Node test2: standby
> > Online: [ ubuntu ]
> >
> > tomcat  (lsb:tomcatpace) Started [      bak1    test1   test2 ]
> >
> > Failed actions:
> >    tomcat_monitor_0 (node=bak1, call=2, rc=254, status=complete):
> <unknown>
> >    tomcat_stop_0 (node=bak1, call=3, rc=254, status=complete): <unknown>
> >    tomcat_monitor_0 (node=test1, call=2, rc=254, status=complete):
> <unknown>
> >    tomcat_stop_0 (node=test1, call=3, rc=254, status=complete): <unknown>
> >    tomcat_monitor_0 (node=test2, call=2, rc=254, status=complete):
> <unknown>  )
> >
> > thanks for any help .
> > _______________________________________________
> > Linux-HA mailing list
> > Linux-HA@lists.linux-ha.org
> > http://lists.linux-ha.org/mailman/listinfo/linux-ha
> > See also: http://linux-ha.org/ReportingProblems
> >
> _______________________________________________
> Linux-HA mailing list
> Linux-HA@lists.linux-ha.org
> http://lists.linux-ha.org/mailman/listinfo/linux-ha
> See also: http://linux-ha.org/ReportingProblems
>
_______________________________________________
Linux-HA mailing list
Linux-HA@lists.linux-ha.org
http://lists.linux-ha.org/mailman/listinfo/linux-ha
See also: http://linux-ha.org/ReportingProblems

Reply via email to