Your stop start and, in particular, status actions are completely broken. The script is not LSB compliant and cannot be used by Pacemaker.
On Wed, Mar 10, 2010 at 7:37 PM, Artur <[email protected]> wrote: > I have a service 'something' that is running on the server first, and > suddenly stops working ... packemaker it to the second server but the > service does not want to run. In such a situation pacemaker should try > to run it on the first server and so does not. Do not try to run > services on any server. > > If the service does not want to run that I want to run to the effect on > the first or second server. Where can succeed in this > > > Marian Marinov pisze: >> On Wednesday 10 March 2010 19:01:02 artur.k wrote: >> >>> Did not help. >>> >>> What options do I add the config to pacemaker to switch services between >>> nods to time until one of the servers will return exit 0 ? >>> >> >> Can you please elaborate a little bit more. I'm not sure if anyone understood >> what you are asking. >> >> Regards, >> Marian >> >> >>>> Make sure your script is lsb compliant: >>>> >>>> http://www.clusterlabs.org/doc/en-US/Pacemaker/1.0/html/Pacemaker_Explain >>>> ed/ap-lsb.html >>>> >>>> A status action is definitely going to cause problems. >>>> >>>> On Fri, Mar 5, 2010 at 2:58 PM, artur.k <[email protected]> wrote: >>>> >>>>> I have the services 'redis-master' /etc/init.d/redis-master: >>>>> >>>>> #! /bin/sh >>>>> >>>>> case "$1" in >>>>> start) >>>>> exit 0 >>>>> ;; >>>>> stop) >>>>> exit 0 >>>>> ;; >>>>> status) >>>>> exit 0 >>>>> ;; >>>>> esac >>>>> >>>>> exit 0 >>>>> >>>>> if changing the on both servers to: >>>>> >>>>> start) >>>>> exit 1 >>>>> >>>>> and >>>>> >>>>> status) >>>>> exit 1 >>>>> >>>>> crm_mon shows the services do not work. I change: >>>>> >>>>> start) >>>>> exit 0 >>>>> >>>>> and >>>>> >>>>> status) >>>>> exit 0 >>>>> >>>>> pacemaker is not trying to run services. How do I fix this ? >>>>> >>>>> >>>>> cib: >>>>> >>>>> <configuration> >>>>> <crm_config> >>>>> <cluster_property_set id="cib-bootstrap-options"> >>>>> <nvpair id="cib-bootstrap-options-dc-version" name="dc-version" >>>>> value="1.0.4-2ec1d189f9c23093bf9239a980534b661baf782d" /> >>>>> <nvpair id="cib-bootstrap-options-cluster-infrastructure" >>>>> name="cluster-infrastructure" value="openais"/> <nvpair >>>>> id="cib-bootstrap-options-expected-quorum-votes" >>>>> name="expected-quorum-votes" value="2"/> <nvpair >>>>> id="cib-bootstrap-options-no-quorum-policy" name="no-quorum-policy" >>>>> value="ignore"/> <nvpair id="cib-bootstrap-options-stonith-enabled" >>>>> name="stonith-enabled" value="false"/> <nvpair >>>>> id="cib-bootstrap-options-stonith-enabled1" >>>>> name="start-failure-is-fatal" value="false"/> </cluster_property_set> >>>>> </crm_config> >>>>> <nodes> >>>>> <node id="test-10" uname="test-10" type="normal"/> >>>>> <node id="test-20" uname="test-20" type="normal"/> >>>>> </nodes> >>>>> <resources> >>>>> <primitive class="lsb" id="redis-master" type="redis-master"> >>>>> <operations> >>>>> <op id="rfs0-o-1" interval="21s" name="monitor" >>>>> timeout="20s"/> <op id="rdrbd0-o-2" name="start" interval="0" >>>>> timeout="60s"/> </operations> >>>>> </primitive> >>>>> <primitive class="ocf" id="ip-lan-1" provider="heartbeat" >>>>> type="IPaddr2"> <instance_attributes id="ip-instance_attributes"> >>>>> <nvpair id="ip-instance_attributes-ip" name="ip" >>>>> value="10.1.x.x"/> <nvpair id="ip-instance_attributes-nic" name="nic" >>>>> value="eth1"/> <nvpair id="ip-instance_attributes-cidr_netmask" >>>>> name="cidr_netmask" value="24"/> </instance_attributes> >>>>> <operations> >>>>> <op id="ip-monitor-21s" interval="21s" name="monitor" >>>>> timeout="5s"/> </operations> >>>>> </primitive> >>>>> </resources> >>>>> <constraints> >>>>> <rsc_order id="order-1" first="redis-master" then="ip-lan-1"/> >>>>> <rsc_colocation id="c1" rsc="ip-lan-1" with-rsc="redis-master" >>>>> score="INFINITY"/> </constraints> >>>>> <rsc_defaults> >>>>> <meta_attributes id="rsc_defaults-options"> >>>>> <nvpair id="rsc_defaults-options-failure-timeout" >>>>> name="failure-timeout" value="5"/> </meta_attributes> >>>>> </rsc_defaults> >>>>> </configuration> >>>>> >>>>> >>>>> crm_mon: >>>>> >>>>> ============ >>>>> Last updated: Fri Mar 5 14:49:48 2010 >>>>> Stack: openais >>>>> Current DC: test-10 - partition with quorum >>>>> Version: 1.0.4-2ec1d189f9c23093bf9239a980534b661baf782d >>>>> 2 Nodes configured, 2 expected votes >>>>> 2 Resources configured. >>>>> ============ >>>>> >>>>> Online: [ test-10 test-20 ] >>>>> >>>>> >>>>> * Node test-10: >>>>> redis-master: migration-threshold=1000000 last-failure='Fri Mar 5 >>>>> 14:49:47 2010' * Node test-20: >>>>> redis-master: migration-threshold=1000000 last-failure='Fri Mar 5 >>>>> 14:49:47 2010' >>>>> >> >> >> ------------------------------------------------------------------------ >> >> _______________________________________________ >> Linux-HA mailing list >> [email protected] >> http://lists.linux-ha.org/mailman/listinfo/linux-ha >> See also: http://linux-ha.org/ReportingProblems >> >> >> __________ Information from ESET NOD32 Antivirus, version of virus signature >> database 4929 (20100309) __________ >> >> The message was checked by ESET NOD32 Antivirus. >> >> http://www.eset.com >> >> > > _______________________________________________ > Linux-HA mailing list > [email protected] > http://lists.linux-ha.org/mailman/listinfo/linux-ha > See also: http://linux-ha.org/ReportingProblems > _______________________________________________ Linux-HA mailing list [email protected] http://lists.linux-ha.org/mailman/listinfo/linux-ha See also: http://linux-ha.org/ReportingProblems
