http://hg.linux-ha.org/dev/file/5072025b79b8/resources/OCF/apache

lines 516-518

another example of how to use exits codes incorrectly.

I'll commit a patch soon.

In your script: Make line 518 look like this (on all nodes!):
exit $OCF_ERR_INSTALLED

Then cleanup the resource or start the cluster from scratch and try again. Should fix it.

Regards
Dominik


Ehlers, Kolja wrote:
Hello,

my simple active/passive cluster seems to work but when running and I do:

/opt/apache2/bin/apachectl stop && mv /opt/apache2/bin/httpd 
/opt/apache2/bin/httpd_

Heartbeat is not failing over apache to node2 (Hard error: apache_2_start_0 failed with rc=6.) This is really odd because the log states "All 2 cluster nodes are eligible to run resources." but then 4 lines further it says "ERROR: unpack_rsc_op: Preventing apache_2 from re-starting anywhere in the cluster". I am using a very simple CIB with one virtual ip and apache grouped. If i stop apache manually heartbeat does restart apache fine. By the way can I configure it so that it does failover right to the other node if apache is stopped or fails? When manually stopping heartbeat the failover does work. So I am not sure which part of my configuration or logs you need to see. I guess im missing something important here.
This is my cib

 <cib admin_epoch="0" generated="true" have_quorum="true" ignore_dtd="false" num_peers="2" cib_feature_revision="2.0" 
crm_feature_set="2.0" epoch="38" num_updates="3" cib-last-written="Wed Jul  2 16:16:51 2008" ccm_transition="2" 
dc_uuid="5e0f97b7-6780-4487-baf9-6c36500b1276">
   <configuration>
     <crm_config>
       <cluster_property_set id="cib-bootstrap-options">
         <attributes>
           <nvpair id="cib-bootstrap-options-symmetric-cluster" name="symmetric-cluster" 
value="true"/>
           <nvpair id="cib-bootstrap-options-default-resource-stickiness" 
name="default-resource-stickiness" value="INFINITY"/>
           <nvpair id="cib-bootstrap-options-is-managed-default" name="is-managed-default" 
value="true"/>
           <nvpair id="cib-bootstrap-options-no-quorum-policy" name="no-quorum-policy" 
value="stop"/>
           <nvpair id="cib-bootstrap-options-dc-version" name="dc-version" 
value="2.1.3-node: a3184d5240c6e7032aef9cce6e5b7752ded544b3"/>
         </attributes>
       </cluster_property_set>
     </crm_config>
     <nodes>
       <node id="5e0f97b7-6780-4487-baf9-6c36500b1276" uname="www2test" 
type="normal"/>
       <node id="3a325e23-2184-46ed-9e88-42a11f28c2be" uname="www1test" 
type="normal"/>
     </nodes>
     <resources>
       <group id="group_1">
         <primitive class="ocf" id="IPaddr_192_168_11_25" provider="heartbeat" 
type="IPaddr">
           <operations>
             <op id="IPaddr_192_168_11_25_mon" interval="5s" name="monitor" 
timeout="5s"/>
           </operations>
           <instance_attributes id="IPaddr_192_168_11_25_inst_attr">
             <attributes>
               <nvpair id="IPaddr_192_168_11_25_attr_0" name="ip" 
value="192.168.11.25"/>
             </attributes>
           </instance_attributes>
         </primitive>
         <primitive class="ocf" id="apache_2" provider="heartbeat" 
type="apache">
           <operations>
             <op id="apache_2_mon" interval="5s" name="monitor" timeout="10s"/>
           </operations>
           <instance_attributes id="apache_2_inst_attr">
             <attributes>
               <nvpair id="apache_2_attr_0" name="configfile" 
value="/opt/apache2/conf/httpd.conf"/>
             </attributes>
           </instance_attributes>
           <instance_attributes id="apache_2">
             <attributes>
               <nvpair id="apache_2-httpd" name="httpd" 
value="/opt/apache2/bin/httpd"/>
             </attributes>
           </instance_attributes>
         </primitive>
       </group>
     </resources>
     <constraints>
       <rsc_location id="run_group1" rsc="group_1">
         <rule id="pref_run_apache_group" score="0">
           <expression attribute="#uname" operation="eq" value="www1test" 
id="7667baf9-522d-40ac-a901-195bfe84a3df"/>
         </rule>
       </rsc_location>
     </constraints>
   </configuration>
 </cib>

Gesch�ftsf�hrung: Dr. Michael Fischer, Reinhard Eisebitt
Amtsgericht K�ln HRB 32356
Steuer-Nr.: 217/5717/0536
Ust.Id.-Nr.: DE 204051920
--
This email transmission and any documents, files or previous email
messages attached to it may contain information that is confidential or
legally privileged. If you are not the intended recipient or a person
responsible for delivering this transmission to the intended recipient,
you are hereby notified that any disclosure, copying, printing,
distribution or use of this transmission is strictly prohibited. If you
have received this transmission in error, please immediately notify the
sender by telephone or return email and delete the original transmission
and its attachments without reading or saving in any manner.

_______________________________________________
Linux-HA mailing list
[email protected]
http://lists.linux-ha.org/mailman/listinfo/linux-ha
See also: http://linux-ha.org/ReportingProblems



--

IN-telegence GmbH & Co. KG
Oskar-Jäger-Str. 125
50825 Köln

Registergericht Köln - HRA 14064, USt-ID Nr. DE 194 156 373
ph Gesellschafter: komware Unternehmensverwaltungsgesellschaft mbH,
Registergericht Köln - HRB 38396
Geschäftsführende Gesellschafter: Christian Plätke und Holger Jansen
_______________________________________________
Linux-HA mailing list
[email protected]
http://lists.linux-ha.org/mailman/listinfo/linux-ha
See also: http://linux-ha.org/ReportingProblems

Reply via email to