OSDN Git Service

Update heartbeat files.
authorTATEISHI Katsuyuki <kt@wheel.jp>
Thu, 6 Aug 2009 08:37:02 +0000 (17:37 +0900)
committerTATEISHI Katsuyuki <kt@wheel.jp>
Thu, 6 Aug 2009 08:37:02 +0000 (17:37 +0900)
 * Add new file: authkeys, ha.cf, logd.cf from documentation in sf.jp.
 * Add diskd configuration in cib.xml-sample, cib.xml-sample.sslproxy

doc/heartbeat-ra/README
doc/heartbeat-ra/authkeys [new file with mode: 0644]
doc/heartbeat-ra/cib.xml-sample
doc/heartbeat-ra/cib.xml-sample.sslproxy
doc/heartbeat-ra/ha.cf [new file with mode: 0644]
doc/heartbeat-ra/logd.cf [new file with mode: 0644]

index d2ad5f7..391f741 100644 (file)
@@ -1,14 +1,20 @@
-Heartbeat Resource Agent and cib-xml examples.
+Heartbeat Resource Agent and example configuration files.
 
 == Files ==
 L7directord:   Resource Agent for l7directord.
 L7vsd:         Resource Agent for l7vsd.
 SSLProxy:      Resource Agent for sslproxy.
 VIPcheck:      Resource Agent for VIP.
-cib.xml-sample:        Heartbeat cib.xml Example.
+authkeys:      Heartbeat authkey example.
+cib.xml-sample:        Heartbeat cib.xml example.
 cib.xml-sample.ssl:
-               Heartbeat cib.xml Example using SSLProxy.
+               Heartbeat cib.xml example using SSLProxy.
+ha.cf:         Heartbeat ha.cf example.
+logd.cf:       Heartbeat logd.cf example.
 
 == Set up ==
 See Heartbeat2 install manual for UltraMonkey-L7. (Japanese)
 http://sourceforge.jp/projects/ultramonkey-l7/docs/?category_id=964
+
+You can use Resource Agents as they are.  But you must edit at
+least IP addresses in configuration files.
diff --git a/doc/heartbeat-ra/authkeys b/doc/heartbeat-ra/authkeys
new file mode 100644 (file)
index 0000000..c27e81a
--- /dev/null
@@ -0,0 +1,2 @@
+auth 1
+1 sha1 ClusterKey01
index 74a8d69..f30ded1 100644 (file)
@@ -17,7 +17,7 @@
          <primitive id="prmVIPcheck" class="ocf" type="VIPcheck" provider="heartbeat">
            <instance_attributes id="prmVIPcheck_instance_attrs">
              <attributes>
-               <nvpair id="atr:VIPcheck:ex:VIPcheck:target_ip" name="target_ip" value="192.168.43.10"/>
+               <nvpair id="atr:VIPcheck:ex:VIPcheck:target_ip" name="target_ip" value="192.168.1.200"/>
                <nvpair id="atr:VIPcheck:ex:VIPcheck:count" name="count" value="1"/>
                <nvpair id="atr:VIPcheck:ex:VIPcheck:wait" name="wait" value="10"/>
              </attributes>
@@ -29,9 +29,9 @@
          <primitive id="prmVIP" class="ocf" type="IPaddr2" provider="heartbeat">
            <instance_attributes id="prmVIP_instance_attrs">
              <attributes>
-               <nvpair id="atr:VIP:ex:IPadder2:ip" name="ip" value="192.168.43.10"/>
-               <nvpair id="atr:VIP:ex:IPadder2:nic" name="nic" value="bond1"/>
-               <nvpair id="atr:VIP:ex:IPadder2:cidr_netmask" name="cidr_netmask" value="28"/>
+               <nvpair id="atr:VIP:ex:IPadder2:ip" name="ip" value="192.168.1.200"/>
+               <nvpair id="atr:VIP:ex:IPadder2:nic" name="nic" value="eth1"/>
+               <nvpair id="atr:VIP:ex:IPadder2:cidr_netmask" name="cidr_netmask" value="24"/>
              </attributes>
            </instance_attributes>
            <operations>
        <rsc_colocation id="colocation_UltraMonkey1_and_Clone1" from="grpUltraMonkey1" to="grpClone1" score="INFINITY"/>
        <rsc_location id="location_node01_200" rsc="grpUltraMonkey1">
          <rule id="prefered_location_node01_200" score="200">
-           <expression attribute="#uname" id="location:grpUltraMonkey:node01" operation="eq" value="ibww0101"/>
+           <expression attribute="#uname" id="location:grpUltraMonkey:node01" operation="eq" value="LB01"/>
          </rule>
        </rsc_location>
        <rsc_location id="location_node02_100" rsc="grpUltraMonkey1">
          <rule id="prefered_location_node02_100" score="100">
-           <expression attribute="#uname" id="location:grpUltraMonkey:node02" operation="eq" value="ibww0201"/>
+           <expression attribute="#uname" id="location:grpUltraMonkey:node02" operation="eq" value="LB02"/>
          </rule>
        </rsc_location>
        <rsc_location id="rul_PN1_dsc" rsc="grpUltraMonkey1">
            <expression attribute="default_ping_set" id="PN1_dsc:expr:lt" operation="lt" value="100"/>
          </rule>
        </rsc_location>
+       <rsc_location id="rul_diskcheck_status_internal" rsc="grpUltraMonkey1">
+         <rule id="preferd_diskcheck_status_internal" score="-INFINITY" boolean_op="and">
+           <expression attribute="diskcheck_status_internal" id="diskcheck_status_internal:defined" operation="defined"/>
+           <expression attribute="diskcheck_status_internal" id="diskcheck_status_internal:eq" operation="eq" value="ERROR"/>
+         </rule>
+       </rsc_location>
        <rsc_order id="order_UltraMonkey1_and_Clone1" from="grpClone1" action="start" type="before" to="grpUltraMonkey1" score="0"/>
      </constraints>
    </configuration>
index 5c0e051..7803fd0 100644 (file)
-<cib admin_epoch="0" epoch="0" num_updates="0">
-  <configuration>
-    <crm_config>
-      <cluster_property_set id="cib-bootstrap-options">
-        <attributes>
-          <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-default-resource-stickiness" name="default-resource-stickiness" value="INFINITY"/>
-          <nvpair id="cib-bootstrap-options-default-resource-failure-stickiness" name="default-resource-failure-stickiness" value="-INFINITY"/>
-          <nvpair id="cib-bootstrap-options-default-action-timeout" name="default-action-timeout" value="120s"/>
-        </attributes>
-      </cluster_property_set>
-    </crm_config>
-    <nodes/>
-    <resources>
-      <group id="grpUltraMonkey1">
-        <primitive id="prmVIPcheck" class="ocf" type="VIPcheck" provider="heartbeat">
-          <instance_attributes id="prmVIPcheck_instance_attrs">
-            <attributes>
-              <nvpair id="atr:VIPcheck:ex:VIPcheck:target_ip" name="target_ip" value="192.168.43.10"/>
-              <nvpair id="atr:VIPcheck:ex:VIPcheck:count" name="count" value="1"/>
-              <nvpair id="atr:VIPcheck:ex:VIPcheck:wait" name="wait" value="10"/>
-            </attributes>
-          </instance_attributes>
-          <operations>
-            <op id="op:VIPcheck:ex:VIPcheck:start" name="start" timeout="90s" on_fail="block" start_delay="2s"/>
-          </operations>
-        </primitive>
-        <primitive id="prmVIP" class="ocf" type="IPaddr2" provider="heartbeat">
-          <instance_attributes id="prmVIP_instance_attrs">
-            <attributes>
-              <nvpair id="atr:VIP:ex:IPadder2:ip" name="ip" value="192.168.43.10"/>
-              <nvpair id="atr:VIP:ex:IPadder2:nic" name="nic" value="eth1"/>
-              <nvpair id="atr:VIP:ex:IPadder2:cidr_netmask" name="cidr_netmask" value="28"/>
-            </attributes>
-          </instance_attributes>
-          <operations>
-            <op id="op:VIP:ex:IPadder2:start" name="start" timeout="60s" on_fail="restart"/>
-            <op id="op:VIP:ex:IPadder2:monitor" name="monitor" interval="10s" timeout="60s" on_fail="restart"/>
-            <op id="op:VIP:ex:IPadder2:stop" name="stop" timeout="60s" on_fail="block"/>
-          </operations>
-        </primitive>
-        <primitive id="prmL7directord" class="ocf" type="L7directord" provider="heartbeat">
-          <operations>
-            <op id="op:L7directord:ex:L7directord:start" name="start" timeout="60s" on_fail="restart"/>
-            <op id="op:L7directord:ex:L7directord:monitor" name="monitor" interval="10s" timeout="60s" on_fail="restart"/>
-            <op id="op:L7directord:ex:L7directord:stop" name="stop" timeout="60s" on_fail="block"/>
-          </operations>
-        </primitive>
-        <primitive id="prmSSLProxy" class="ocf" type="SSLProxy" provider="heartbeat">
-          <operations>
-            <op id="op:SSLProxy:ex:SSLProxy:start" name="start" timeout="60s" on_fail="restart"/>
-            <op id="op:SSLProxy:ex:SSLProxy:monitor" name="monitor" interval="10s" timeout="60s" on_fail="restart"/>
-            <op id="op:SSLProxy:ex:SSLProxy:stop" name="stop" timeout="60s" on_fail="block"/>
-          </operations>
-        </primitive>
-        <primitive id="prmBackVIP" class="ocf" type="IPaddr2" provider="heartbeat">
-          <instance_attributes id="prmBackVIP_instance_attrs">
-            <attributes>
-              <nvpair id="atr:BackVIP:ex:IPadder2:ip" name="ip" value="192.168.46.10"/>
-              <nvpair id="atr:BackVIP:ex:IPadder2:nic" name="nic" value="bond0"/>
-              <nvpair id="atr:BackVIP:ex:IPadder2:cidr_netmask" name="cidr_netmask" value="28"/>
-            </attributes>
-          </instance_attributes>
-          <operations>
-            <op id="op:BackVIP:ex:IPadder2:start" name="start" timeout="60s" on_fail="restart"/>
-            <op id="op:BackVIP:ex:IPadder2:monitor" name="monitor" interval="10s" timeout="60s" on_fail="restart"/>
-            <op id="op:BackVIP:ex:IPadder2:stop" name="stop" timeout="60s" on_fail="block"/>
-          </operations>
-        </primitive>
-      </group>
-      <clone id="grpClone1" ordered="false" interleave="false" notify="false" globally_unique="false">
-        <instance_attributes id="grpClone1_attrs">
-          <attributes>
+ <cib admin_epoch="0" epoch="0" num_updates="0">
+   <configuration>
+     <crm_config>
+       <cluster_property_set id="cib-bootstrap-options">
+         <attributes>
+           <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-default-resource-stickiness" name="default-resource-stickiness" value="INFINITY"/>
+           <nvpair id="cib-bootstrap-options-default-resource-failure-stickiness" name="default-resource-failure-stickiness" value="-INFINITY"/>
+           <nvpair id="cib-bootstrap-options-default-action-timeout" name="default-action-timeout" value="120s"/>
+         </attributes>
+       </cluster_property_set>
+     </crm_config>
+     <nodes/>
+     <resources>
+       <group id="grpUltraMonkey1">
+         <primitive id="prmVIPcheck" class="ocf" type="VIPcheck" provider="heartbeat">
+           <instance_attributes id="prmVIPcheck_instance_attrs">
+             <attributes>
+               <nvpair id="atr:VIPcheck:ex:VIPcheck:target_ip" name="target_ip" value="192.168.1.200"/>
+               <nvpair id="atr:VIPcheck:ex:VIPcheck:count" name="count" value="1"/>
+               <nvpair id="atr:VIPcheck:ex:VIPcheck:wait" name="wait" value="10"/>
+             </attributes>
+           </instance_attributes>
+           <operations>
+             <op id="op:VIPcheck:ex:VIPcheck:start" name="start" timeout="90s" on_fail="block" start_delay="2s"/>
+           </operations>
+         </primitive>
+         <primitive id="prmVIP" class="ocf" type="IPaddr2" provider="heartbeat">
+           <instance_attributes id="prmVIP_instance_attrs">
+             <attributes>
+               <nvpair id="atr:VIP:ex:IPadder2:ip" name="ip" value="192.168.1.200"/>
+               <nvpair id="atr:VIP:ex:IPadder2:nic" name="nic" value="eth1"/>
+               <nvpair id="atr:VIP:ex:IPadder2:cidr_netmask" name="cidr_netmask" value="24"/>
+             </attributes>
+           </instance_attributes>
+           <operations>
+             <op id="op:VIP:ex:IPadder2:start" name="start" timeout="60s" on_fail="restart"/>
+             <op id="op:VIP:ex:IPadder2:monitor" name="monitor" interval="10s" timeout="60s" on_fail="restart"/>
+             <op id="op:VIP:ex:IPadder2:stop" name="stop" timeout="60s" on_fail="block"/>
+           </operations>
+         </primitive>
+         <primitive id="prmL7directord" class="ocf" type="L7directord" provider="heartbeat">
+           <operations>
+             <op id="op:L7directord:ex:L7directord:start" name="start" timeout="60s" on_fail="restart"/>
+             <op id="op:L7directord:ex:L7directord:monitor" name="monitor" interval="10s" timeout="60s" on_fail="restart"/>
+             <op id="op:L7directord:ex:L7directord:stop" name="stop" timeout="60s" on_fail="block"/>
+           </operations>
+         </primitive>
+         <primitive id="prmSSLProxy" class="ocf" type="SSLProxy" provider="heartbeat">
+           <operations>
+             <op id="op:SSLProxy:ex:SSLProxy:start" name="start" timeout="60s" on_fail="restart"/>
+             <op id="op:SSLProxy:ex:SSLProxy:monitor" name="monitor" interval="10s" timeout="60s" on_fail="restart"/>
+             <op id="op:SSLProxy:ex:SSLProxy:stop" name="stop" timeout="60s" on_fail="block"/>
+           </operations>
+         </primitive>
+         <primitive id="prmBackVIP" class="ocf" type="IPaddr2" provider="heartbeat">
+           <instance_attributes id="prmBackVIP_instance_attrs">
+             <attributes>
+               <nvpair id="atr:BackVIP:ex:IPadder2:ip" name="ip" value="192.168.46.10"/>
+               <nvpair id="atr:BackVIP:ex:IPadder2:nic" name="nic" value="bond0"/>
+               <nvpair id="atr:BackVIP:ex:IPadder2:cidr_netmask" name="cidr_netmask" value="28"/>
+             </attributes>
+           </instance_attributes>
+           <operations>
+             <op id="op:BackVIP:ex:IPadder2:start" name="start" timeout="60s" on_fail="restart"/>
+             <op id="op:BackVIP:ex:IPadder2:monitor" name="monitor" interval="10s" timeout="60s" on_fail="restart"/>
+             <op id="op:BackVIP:ex:IPadder2:stop" name="stop" timeout="60s" on_fail="block"/>
+           </operations>
+         </primitive>
+       </group>
+       <clone id="grpClone1" ordered="false" interleave="false" notify="false" globally_unique="false">
+         <instance_attributes id="grpClone1_attrs">
+           <attributes>
             <nvpair id="atr:Clone1:ex:clone:clone_max" name="clone_max" value="2"/>
             <nvpair id="atr:Clone1:ex:clone:clone_node_max" name="clone_node_max" value="1"/>
-          </attributes>
-        </instance_attributes>
-        <primitive id="prmL7vsd" class="ocf" type="L7vsd" provider="heartbeat">
-          <operations>
-            <op id="op:L7vsd:ex:L7vsd:start" name="start" timeout="60s" on_fail="restart"/>
-            <op id="op:L7vsd:ex:L7vsd:monitor" name="monitor" interval="10s" timeout="60s" on_fail="restart"/>
-            <op id="op:L7vsd:ex:L7vsd:stop" name="stop" timeout="60s" on_fail="block"/>
-          </operations>
-        </primitive>
-      </clone>
-    </resources>
-    <constraints>
-      <rsc_colocation id="colocation_UltraMonkey1_and_Clone1" from="grpUltraMonkey1" to="grpClone1" score="INFINITY"/>
-      <rsc_location id="location_node01_200" rsc="grpUltraMonkey1">
-        <rule id="prefered_location_node01_200" score="200">
-          <expression attribute="#uname" id="location:grpUltraMonkey:node01" operation="eq" value="iblb0101"/>
-        </rule>
-      </rsc_location>
-      <rsc_location id="location_node02_100" rsc="grpUltraMonkey1">
-        <rule id="prefered_location_node02_100" score="100">
-          <expression attribute="#uname" id="location:grpUltraMonkey:node02" operation="eq" value="iblb0201"/>
-        </rule>
-      </rsc_location>
-      <rsc_location id="rul_PN1_dsc" rsc="grpUltraMonkey1">
-        <rule id="prefered_rul_PN1_dsc" score="-INFINITY" boolean_op="and">
-          <expression attribute="default_ping_set" id="PN1_dsc:expr:defined" operation="defined"/>
-          <expression attribute="default_ping_set" id="PN1_dsc:expr:lt" operation="lt" value="200"/>
-        </rule>
-      </rsc_location>
-      <rsc_order id="order_UltraMonkey1_and_Clone1" from="grpClone1" action="start" type="before" to="grpUltraMonkey1" score="0"/>
-    </constraints>
-  </configuration>
-</cib>
+           </attributes>
+         </instance_attributes>
+         <primitive id="prmL7vsd" class="ocf" type="L7vsd" provider="heartbeat">
+           <operations>
+             <op id="op:L7vsd:ex:L7vsd:start" name="start" timeout="60s" on_fail="restart"/>
+             <op id="op:L7vsd:ex:L7vsd:monitor" name="monitor" interval="10s" timeout="60s" on_fail="restart"/>
+             <op id="op:L7vsd:ex:L7vsd:stop" name="stop" timeout="60s" on_fail="block"/>
+           </operations>
+         </primitive>
+       </clone>
+     </resources>
+     <constraints>
+       <rsc_colocation id="colocation_UltraMonkey1_and_Clone1" from="grpUltraMonkey1" to="grpClone1" score="INFINITY"/>
+       <rsc_location id="location_node01_200" rsc="grpUltraMonkey1">
+         <rule id="prefered_location_node01_200" score="200">
+           <expression attribute="#uname" id="location:grpUltraMonkey:node01" operation="eq" value="LB01"/>
+         </rule>
+       </rsc_location>
+       <rsc_location id="location_node02_100" rsc="grpUltraMonkey1">
+         <rule id="prefered_location_node02_100" score="100">
+           <expression attribute="#uname" id="location:grpUltraMonkey:node02" operation="eq" value="LB02"/>
+         </rule>
+       </rsc_location>
+       <rsc_location id="rul_PN1_dsc" rsc="grpUltraMonkey1">
+         <rule id="prefered_rul_PN1_dsc" score="-INFINITY" boolean_op="and">
+           <expression attribute="default_ping_set" id="PN1_dsc:expr:defined" operation="defined"/>
+           <expression attribute="default_ping_set" id="PN1_dsc:expr:lt" operation="lt" value="100"/>
+         </rule>
+       </rsc_location>
+       <rsc_location id="rul_diskcheck_status_internal" rsc="grpUltraMonkey1">
+         <rule id="preferd_diskcheck_status_internal" score="-INFINITY" boolean_op="and">
+           <expression attribute="diskcheck_status_internal" id="diskcheck_status_internal:defined" operation="defined"/>
+           <expression attribute="diskcheck_status_internal" id="diskcheck_status_internal:eq" operation="eq" value="ERROR"/>
+         </rule>
+       </rsc_location>
+       <rsc_order id="order_UltraMonkey1_and_Clone1" from="grpClone1" action="start" type="before" to="grpUltraMonkey1" score="0"/>
+     </constraints>
+   </configuration>
+ </cib>
diff --git a/doc/heartbeat-ra/ha.cf b/doc/heartbeat-ra/ha.cf
new file mode 100644 (file)
index 0000000..3fcc2bb
--- /dev/null
@@ -0,0 +1,21 @@
+crm on
+use_logd on
+
+debug 0
+udpport 694
+keepalive 2
+warntime 7
+deadtime 10
+initdead 48
+
+bcast eth2
+bcast eth3
+
+node hpww0101
+node hpww0201
+
+watchdog /dev/watchdog
+respawn root /usr/lib64/heartbeat/pingd -m 100 -a default_ping_set
+ping 192.168.43.14
+respawn root /usr/lib64/heartbeat/diskd -N /dev/sda -a diskcheck_status_internal -i 10
+respawn root /etc/ha.d/monitoring/heartbeat_logmoni.sh monitor
diff --git a/doc/heartbeat-ra/logd.cf b/doc/heartbeat-ra/logd.cf
new file mode 100644 (file)
index 0000000..9775431
--- /dev/null
@@ -0,0 +1,3 @@
+logfile /var/log/ha-log
+debugfile /var/log/ha-debug
+logfacility none