~le-charmers/charms/trusty/hacluster/leadership-election

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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
# Config file generated by the ha charm.

totem {
	version: 2

	# How long before declaring a token lost (ms)
	token: 3000

	# How many token retransmits before forming a new configuration
	token_retransmits_before_loss_const: 10

	# How long to wait for join messages in the membership protocol (ms)
	join: 60

	# How long to wait for consensus to be achieved before starting a new round of membership configuration (ms)
	consensus: 3600

	# Turn off the virtual synchrony filter
	vsftype: none

	# Number of messages that may be sent by one processor on receipt of the token
	max_messages: 20

	# Limit generated nodeids to 31-bits (positive signed integers)
	clear_node_high_bit: yes

	# Disable encryption
	secauth: off

	# How many threads to use for encryption/decryption
	threads: 0

	{% if nodeid %}
	nodeid: {{ nodeid }}
	{% endif %}
	{% if ip_version %}
	ip_version: {{ ip_version }}
	{% endif %}
	{% if netmtu %}
	netmtu: {{ netmtu }}
	{% endif %}

	# This specifies the mode of redundant ring, which may be none, active, or passive.
	rrp_mode: none

	interface {
		# The following values need to be set based on your environment
		ringnumber: 0
		bindnetaddr: {{ corosync_bindnetaddr }}
		{% if transport == "udp" %}
		mcastaddr: {{ corosync_mcastaddr }}
		{% endif %}
		mcastport: {{ corosync_mcastport }}
	}
        transport: {{ transport }}
}

quorum {
	# Enable and configure quorum subsystem (default: off)
	# see also corosync.conf.5 and votequorum.5
	provider: corosync_votequorum
	{% if transport == "udp" -%}
	expected_votes: {{ ha_nodes|length }}
	{% endif -%}
	{% if ha_nodes|length == 2 -%}
	two_node: 1
	{% endif -%}
}

{% if transport == "udpu" %}
nodelist {
{% for nodeid, ip in ha_nodes.iteritems() %}
        node {
               ring0_addr: {{ ip }}
               nodeid: {{ nodeid }}
        }
{% endfor %}
}
{% endif %}

logging {
	fileline: off
	to_stderr: yes
	to_logfile: no
	to_syslog: yes
	syslog_facility: daemon
	debug: {% if debug %}on{% else %}off{% endif %}
	logger_subsys {
		subsys: QUORUM
		debug: {% if debug %}on{% else %}off{% endif %}
	}
}