d1191dbcab
Starting in focal, the ubuntu version of corosync package synced in from debian includes node1 as the default name for the local node with a nodeid of 1. This causes the cluster to have knowledge of this extra node1 node, which affects quorum, etc. Installing the charm's corosync.conf file before package installation prevents this conditioning from happening. Additionally this change removes some Xenial bits in the charm and always includes a nodelist in corosync.conf as it is compulsory in focal and newer. It is optional in the bionic packages, so we'll always just render the nodelist. Change-Id: I06b9c23eb57274f0c99a3a05979c0cabf87c8118 Closes-Bug: #1874719
91 lines
2.0 KiB
Plaintext
91 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 -%}
|
|
}
|
|
|
|
nodelist {
|
|
{% for nodeid, ip in ha_nodes.items() %}
|
|
node {
|
|
ring0_addr: {{ ip }}
|
|
nodeid: {{ nodeid }}
|
|
}
|
|
{% endfor %}
|
|
}
|
|
|
|
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 %}
|
|
}
|
|
}
|