--cluster-cman option
root and must have their primary group set to ais. A user called 'qpidd' with the correct membership is created during installation.
openais package.
openais service is not running:
# service openais stop Stopping OpenAIS daemon (aisexec): [ OK ]
/etc/ais/openais.conf using the following information:
totem {
version: 2
secauth: off
threads: 0
interface {
ringnumber: 0
bindnetaddr: 192.168.1.0 # Modify for your network
mcastaddr: 226.94.1.1
mcastport: 5405
}
}
logging {
to_syslog: yes
}
amf {
mode: disabled
}
bindnetaddr entry should be set to the subnet you will use for cluster multicast. Use the same subnet for for all hosts in the cluster. You can find the subnet with /sbin/ifconfig. For example:
# /sbin/ifconfig eth0
eth0 Link encap:Ethernet HWaddr 00:1E:37:88:72:8A
inet addr:192.168.1.103 Bcast:192.168.1.255 Mask:255.255.255.0
In this case the local address is 192.168.1.103 and the subnet mask is 255.255.255.0. The subnet is the bitwise AND of the mask and the local address, 192.168.1.255.
# service openais start Starting OpenAIS daemon (aisexec): [ OK ]
openais.conf:
rrp_mode=active or rrp_mode=passive
bindnetaddr for your second network.
qpid-tool:
Object of type org.apache.qpid.cluster:cluster: (last sample time: 15:07:23) Type Element 110 ============================================================================= property brokerRef 102 property clusterName test_cluster property clusterID 1a911c67-6fcd-4ffa-8fc8-0dc74ec14ec0 property publishedURL amqp:tcp:10.16.18.96:5672 property clusterSize 2 property status ACTIVE property members amqp:tcp:10.16.18.96:5672 amqp:tcp:10.16.18.96:5673
| Options for clustering | |
|---|---|
--cluster-name
| Name of the Messaging Cluster to join. A Messaging Cluster consists of all brokers started with the same cluster-name and openais configuration. |
--cluster-url
|
An AMQP URL containing the local address advertised to clients for fail-over connections. This is different for each host. By default, all local addresses are advertized. You only need to set this if
amqp:tcp:<host>:<port>[,tcp:<host>:<port> ...] For example: amqp:tcp:192.168.1.103:5672,tcp:192.168.1.105:5672
|
--cluster-cman
|
CMAN protects against the "split-brain" condition, in which a network failure splits the cluster into two sub-clusters that cannot communicate with each other. When "split-brain" occurs, each of the sub-clusters can access shared resources without knowledge of the other sub-cluster, resulting in corrupted cluster integrity.
To avoid "split-brain", CMAN uses the notion of a "quorum". If more than half the cluster nodes are active, the cluster has quorum and can act. If half (or fewer) nodes are active, the cluster does not have quorum, and all cluster activity is stopped. There are other ways to define the quorum for particular use cases (e.g. a cluster of only 2 members), see the CMAN documentation for more detail.
When enabled, the MRG broker will wait until it belongs to a quorate cluster before accepting client connections. It continually monitors the quorum status and shuts down immediately if the node it runs on loses touch with the quorum.
|