LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-26-2010, 10:00 AM   #1
ptemmerman
Member
 
Registered: Oct 2008
Location: Spain
Distribution: Ubuntu
Posts: 75

Rep: Reputation: 15
Question Heartbeat v2 (crm): Apache not failing over


Hi all,

I mounted 2 Apaches in failover-mode with Heartbeat v2 (CRM).

The problem that I am having is the following:

Machine1: Heartbeat is online with virtual IP and httpd started
Machine2: Heartbeat is active, no virtual IP or httpd started

Heartbeat1 detects the machine's apache is not responding. It kills the Apache process and tells heartbeat2 to take over.
Heartbeat2 takes over and launches Apache. Till here everything is working as expected.

Now, the problem is that if heartbeat2 detects that machine2 apache is not responding, it kills the apache process and tells heartbeat1 to take over. In the meantime, the apache problem on machine1 was fixed, so I would suspect that heartbeat1 would launch Apache. Instead, it doesn't...it just fails over the virtual IP, and never tries to start Apache.

How can I force heartbeat to always try to start Apache?

This is my cib.xml:

Code:
 <cib admin_epoch="0" epoch="18" generated="true" have_quorum="true" ignore_dtd="false" num_peers="2" cib_feature_revision="2.0" crm_feature_set="2.0" num_updates="20" cib-last-written="Fri Nov 26 09:33:35 2010" ccm_transition="2" dc_uuid="78983dfb-d8a4-42e0-8d8f-eae3a5252c46">
   <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-no-quorum-policy" name="no-quorum-policy" value="stop"/>
           <nvpair id="cib-bootstrap-options-default-resource-stickiness" name="default-resource-stickiness" value="0"/>
           <nvpair id="cib-bootstrap-options-default-resource-failure-stickiness" name="default-resource-failure-stickiness" value="0"/>
           <nvpair id="cib-bootstrap-options-stonith-enabled" name="stonith-enabled" value="false"/>
           <nvpair id="cib-bootstrap-options-stonith-action" name="stonith-action" value="reboot"/>
           <nvpair id="cib-bootstrap-options-startup-fencing" name="startup-fencing" value="true"/>
           <nvpair id="cib-bootstrap-options-stop-orphan-resources" name="stop-orphan-resources" value="true"/>
           <nvpair id="cib-bootstrap-options-stop-orphan-actions" name="stop-orphan-actions" value="true"/>
           <nvpair id="cib-bootstrap-options-remove-after-stop" name="remove-after-stop" value="false"/>
           <nvpair id="cib-bootstrap-options-short-resource-names" name="short-resource-names" value="true"/>
           <nvpair id="cib-bootstrap-options-transition-idle-timeout" name="transition-idle-timeout" value="5min"/>
           <nvpair id="cib-bootstrap-options-default-action-timeout" name="default-action-timeout" value="20s"/>
           <nvpair id="cib-bootstrap-options-is-managed-default" name="is-managed-default" value="true"/>
           <nvpair id="cib-bootstrap-options-cluster-delay" name="cluster-delay" value="60s"/>
           <nvpair id="cib-bootstrap-options-pe-error-series-max" name="pe-error-series-max" value="-1"/>
           <nvpair id="cib-bootstrap-options-pe-warn-series-max" name="pe-warn-series-max" value="-1"/>
           <nvpair id="cib-bootstrap-options-pe-input-series-max" name="pe-input-series-max" value="-1"/>
           <nvpair id="cib-bootstrap-options-dc-version" name="dc-version" value="2.1.4-node: aa909246edb386137b986c5773344b98c6969999"/>
         </attributes>
       </cluster_property_set>
     </crm_config>
     <nodes>
       <node id="78983dfb-d8a4-42e0-8d8f-eae3a5252c46" uname="domu-12-31-39-02-29-83" type="normal">
         <instance_attributes id="nodes-78983dfb-d8a4-42e0-8d8f-eae3a5252c46">
           <attributes>
             <nvpair id="standby-78983dfb-d8a4-42e0-8d8f-eae3a5252c46" name="standby" value="false"/>
           </attributes>
         </instance_attributes>
       </node>
       <node id="7d7231a9-c7a7-41af-bc98-4c1f883ae983" uname="domu-12-31-39-02-5a-37" type="normal"/>
     </nodes>
     <resources>
       <group id="group_1">
         <primitive class="ocf" id="IPaddr2_1" provider="heartbeat" type="IPaddr2">
           <operations>
             <op id="IPaddr2_1_mon" interval="5s" name="monitor" timeout="5s"/>
           </operations>
           <instance_attributes id="IPaddr2_1_inst_attr">
             <attributes>
               <nvpair id="IPaddr2_1_attr_0" name="ip" value="1.2.3.4"/>
               <nvpair id="IPaddr2_1_attr_1" name="nic" value="eth0:1"/>
               <nvpair id="IPaddr2_1_attr_2" name="netmask" value="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="60s"/>
           </operations>
           <instance_attributes id="apache_2_inst_attr">
             <attributes>
               <nvpair id="apache_2_attr_0" name="configfile" value="/etc/httpd/conf/httpd.conf"/>
             </attributes>
           </instance_attributes>
         </primitive>
       </group>
     </resources>
     <constraints>
       <rsc_location id="rsc_location_group_1" rsc="group_1">
         <rule id="prefered_location_group_1" score="100">
           <expression attribute="#uname" id="prefered_location_group_1_expr" operation="eq" value="domU-12-31-39-02-29-83"/>
         </rule>
       </rsc_location>
     </constraints>
   </configuration>
   <status>
   </status>
 </cib>

Last edited by Tinkster; 11-28-2010 at 11:35 AM. Reason: replaced PHP w/ CODE tags ... save people scrolling sideways for 10 minutes
 
Old 11-29-2010, 12:06 PM   #2
ptemmerman
Member
 
Registered: Oct 2008
Location: Spain
Distribution: Ubuntu
Posts: 75

Original Poster
Rep: Reputation: 15
I've read the whole Pacemaker configuration v2 manual and still have no clue about this.
Somebody, please?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Web Load Balancing (apache+heartbeat+ldirector) : Unable to connect to real servers dipakbiswal Linux - Networking 1 11-08-2009 04:34 AM
IP Virtual IP - Heartbeat Apache Icantprintinlinux Linux - Server 4 05-28-2009 12:58 PM
Apache Server Compilation failing on AIX 5.3 aixuser Linux - Server 2 03-10-2009 01:44 AM
LXer: Open source CRM meets SaaS CRM LXer Syndicated Linux News 0 10-05-2006 10:54 AM
apache redirection failing acid_kewpie Linux - Networking 2 08-15-2002 04:29 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:52 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration