Bonjour,

J'ai tenter une installation de heartbeat-2 dans le but de mettre en place un Cluster Actif/passif, qui basculerait sur le second serveur si le master n'est plus pinger ou alors si le service est down.
Le service en question est Asterisk.
J'ai fait des modification dans le fichier de démarrage pour que le status retourne "3" en cas de problème, conformément à la norme LSB.

Et le problème est que ni mon adresse Virtuelle ni le service Asterisk est monté par heartbeat :

Node: frontal-2 (20b683fe-840e-46b8-9281-71d162519f17): online
Node: frontal-1 (8e801665-ffc5-4029-a6a6-5152268b91bd): online

Full list of resources:

Resource Group: node1
IP_192_168_2_80 (heartbeat::ocf:IPaddr): Stopped
asterisk_1 (lsb:asterisk): Stopped


Le premier serveur se nomme Frontal-1 (192.168.2.78), le deuxieme Frontal-2 (192.168.2.79), et la vip est 192.168.2.80.


Voici les logs :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
Frontal-1:/var/lib/heartbeat/crm# crm_verify -L -VVV
crm_verify[2355]: 2008/10/09_16:49:24 info: main:crm_verify.c =#=#=#=#= Getting XML =#=#=#=#=
crm_verify[2355]: 2008/10/09_16:49:24 info: main:crm_verify.c Reading XML from: live cluster
crm_verify[2355]: 2008/10/09_16:49:24 notice: main:crm_verify.c Required feature set: 1.1
crm_verify[2355]: 2008/10/09_16:49:24 info: unpack_config:unpack.c Default stickiness: 0
crm_verify[2355]: 2008/10/09_16:49:24 info: unpack_config:unpack.c Default failure stickiness: 0
crm_verify[2355]: 2008/10/09_16:49:24 info: unpack_config:unpack.c STONITH of failed nodes is disabled
crm_verify[2355]: 2008/10/09_16:49:24 info: unpack_config:unpack.c STONITH will reboot nodes
crm_verify[2355]: 2008/10/09_16:49:24 info: unpack_config:unpack.c Cluster is symmetric - resources can run anywhere by default
crm_verify[2355]: 2008/10/09_16:49:24 info: unpack_config:unpack.c On loss of CCM Quorum: Stop ALL resources
crm_verify[2355]: 2008/10/09_16:49:24 info: unpack_config:unpack.c Orphan resources are stopped
crm_verify[2355]: 2008/10/09_16:49:24 info: unpack_config:unpack.c Orphan resource actions are stopped
crm_verify[2355]: 2008/10/09_16:49:24 info: unpack_config:unpack.c Stopped resources are removed from the status section: false
crm_verify[2355]: 2008/10/09_16:49:24 info: unpack_config:unpack.c By default resources are managed
crm_verify[2355]: 2008/10/09_16:49:24 info: determine_online_status:unpack.c Node frontal-1 is online
crm_verify[2355]: 2008/10/09_16:49:24 info: determine_online_status:unpack.c Node frontal-2 is online
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
Frontal-1:/var/lib/heartbeat/crm# cat /etc/ha.d/ha.cf
use_logd on
keepalive 500ms
deadtime 2
warntime 1
initdead 8
udpport 694
ping 192.168.2.245
bcast eth0
auto_failback off
node Frontal-1
node Frontal-2
crm yes
autojoin any
Voici mon /var/lib/heartbeat/crm/cib.xml :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
  <cib admin_epoch="0" have_quorum="true" num_peers="2" cib_feature_revision="1.3" generated="true" epoch="23" num_updates="249" cib-last-written="Thu Oct  9 16:22:00 2008" ccm_transition="2" dc_uuid="8e801665-ffc5-4029-a6a6-5152268b91bd">
   <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-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="5s"/>
           <nvpair id="cib-bootstrap-options-is_managed_default" name="is_managed_default" value="true"/>
         </attributes>
       </cluster_property_set>
     </crm_config>
     <nodes>
       <node id="20b683fe-840e-46b8-9281-71d162519f17" uname="frontal-2" type="normal"/>
       <node id="8e801665-ffc5-4029-a6a6-5152268b91bd" uname="frontal-1" type="normal"/>
     </nodes>
     <resources>
       <group id="node1">
         <primitive class="ocf" id="IP_192_168_2_80" provider="heartbeat" type="IPaddr">
           <operations>
             <op id="IP_192_168_2_80_mon" interval="10s" name="monitor" timeout="5s"/>
           </operations>
           <instance_attributes id="IP_192_168_2_80_inst_attr">
             <attributes>
               <nvpair id="IP_192_168_2_80_attr_0" name="ip" value="192.168.2.80"/>
               <nvpair id="IP_192_168_2_80_attr_1" name="netmask" value="24"/>
               <nvpair id="IP_192_168_2_80_attr_2" name="nic" value="eth0"/>
             </attributes>
           </instance_attributes>
         </primitive>
         <primitive class="lsb" id="asterisk_1" provider="heartbeat" type="asterisk">
           <operations>
             <op id="asterisk_1_status" interval="30s" name="status" timeout="20s"/>
           </operations>
         </primitive>
       </group>
     </resources>
     <constraints>
       <rsc_location id="location_node1" rsc="node1">
         <rule id="best_location_node1" score="100">
           <expression attribute="#uname" id="best_location_node1_expr" operation="eq" value="frontal-1"/>
         </rule>
       </rsc_location>
       <rsc_location id="node1_connected" rsc="node1">
         <rule id="node1_connected_rule" score="-INFINITY" boolean_op="or">
           <expression id="node1_connected_undefined" attribute="pingd" operation="not_defined"/>
           <expression id="node1_connected_zero" attribute="pingd" operation="lte" value="0"/>
         </rule>
       </rsc_location>
     </constraints>
   </configuration>
 </cib>