charm-hacluster/templates/corosync.conf

93 lines
2.0 KiB
Plaintext

# 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
{% if transport == "udp" %}
interface {
# The following values need to be set based on your environment
ringnumber: 0
bindnetaddr: {{ corosync_bindnetaddr }}
mcastaddr: {{ corosync_mcastaddr }}
mcastport: {{ corosync_mcastport }}
}
{% endif %}
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.items() %}
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 %}
}
}