summaryrefslogtreecommitdiff
path: root/qpid/cpp/etc/cluster.conf-example.xml
blob: 555843fd8e114f96c020ed2aa075adaf0371c4ab (plain)
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
<?xml version="1.0"?>
<!--
This is an example of a cluster.conf file to run qpidd under rgmanager.
This example assumes a 3 node cluster, with nodes named mrg32, mrg34 and mrg35.
There is no fencing in this configuration.
-->

<cluster alias="qpid-hot-standby" config_version="4" name="qpid-hot-standby">
  <!-- The cluster has 3 nodes. Each has a unique nodid and one vote for quorum. -->
  <clusternodes>
    <clusternode name="mrg32" nodeid="1">
      <fence/>
    </clusternode>
    <clusternode name="mrg34" nodeid="2">
      <fence/>
    </clusternode>
    <clusternode name="mrg35" nodeid="3">
      <fence/>
    </clusternode>
  </clusternodes>
  <cman/>
  <!-- Optionally you can specify logging, this is the most verbose -->
  <rm log_level="7" log_facility="daemon">

    <!--
	There is a failoverdomain for each node containing just that node.
	This lets us stipulate that the qpidd service should always run on all nodes.
    -->
    <failoverdomains>
      <failoverdomain name="mrg32-domain" restricted="1">
	<failoverdomainnode name="mrg32"/>
      </failoverdomain>
      <failoverdomain name="mrg34-domain" restricted="1">
	<failoverdomainnode name="mrg34"/>
      </failoverdomain>
      <failoverdomain name="mrg35-domain" restricted="1">
	<failoverdomainnode name="mrg35"/>
      </failoverdomain>
    </failoverdomains>

    <resources>
      <!-- This script starts a qpidd broker acting as a backup. -->
      <script file="/etc/init.d/qpidd" name="qpidd"/>

      <!-- This script promotes the qpidd broker on this node to primary. -->
      <script file="/etc/init.d/qpidd-primary" name="qpidd-primary"/>

      <!-- This is a virtual IP address for broker replication traffic. -->
      <ip address="20.0.10.200" monitor_link="1"/>

      <!-- This is a virtual IP address on a seprate network for client traffic. -->
      <ip address="20.0.20.200" monitor_link="1"/>
    </resources>

    <!-- There is a qpidd service on each node, it should be restarted if it fails. -->
    <service name="mrg32-qpidd-service" domain="mrg32-domain" recovery="restart">
      <script ref="qpidd"/>
    </service>
    <service name="mrg34-qpidd-service" domain="mrg34-domain" recovery="restart">
      <script ref="qpidd"/>
    </service>
    <service name="mrg35-qpidd-service" domain="mrg35-domain"  recovery="restart">
      <script ref="qpidd"/>
    </service>

    <!-- There should always be a single qpidd-primary service, it can run on any node. -->
    <service name="qpidd-primary-service" autostart="1" exclusive="0" recovery="relocate">
      <script ref="qpidd-primary"/>
      <!-- The primary has the IP addresses for brokers and clients. -->
      <ip ref="20.0.10.200"/>
      <ip ref="20.0.20.200"/>
    </service>
  </rm>
  <fencedevices/>
  <fence_daemon clean_start="0" post_fail_delay="0" post_join_delay="3"/>
</cluster>