Commit 2f8aa88f authored by Ferenc Wágner's avatar Ferenc Wágner
Browse files

Use the upstream configuration example

Nodelist is required now, and it's better to let the token timeout scale
with the cluster size.  All in all, we might as well patch the upstream
example into a working configuration.
parent f69e2aa8
# Please read the corosync.conf.5 manual page
totem {
version: 2
# Corosync itself works without a cluster name, but DLM needs one.
# The cluster name is also written into the VG metadata of newly
# created shared LVM volume groups, if lvmlockd uses DLM locking.
# It is also used for computing mcastaddr, unless overridden below.
cluster_name: debian
# 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
# Limit generated nodeids to 31-bits (positive signed integers)
clear_node_high_bit: yes
# crypto_cipher and crypto_hash: Used for mutual node authentication.
# If you choose to enable this, then do remember to create a shared
# secret with "corosync-keygen".
# enabling crypto_cipher, requires also enabling of crypto_hash.
# crypto_cipher and crypto_hash should be used instead of deprecated
# secauth parameter.
# Valid values for crypto_cipher are none (no encryption), aes256, aes192,
# aes128 and 3des. Enabling crypto_cipher, requires also enabling of
# crypto_hash.
crypto_cipher: none
# Valid values for crypto_hash are none (no authentication), md5, sha1,
# sha256, sha384 and sha512.
crypto_hash: none
# Optionally assign a fixed node id (integer)
# nodeid: 1234
# interface: define at least one interface to communicate
# over. If you define more than one interface stanza, you must
# also set rrp_mode.
interface {
# Rings must be consecutively numbered, starting at 0.
ringnumber: 0
# This is normally the *network* address of the
# interface to bind to. This ensures that you can use
# identical instances of this configuration file
# across all your cluster nodes, without having to
# modify this option.
bindnetaddr: 127.0.0.1
# However, if you have multiple physical network
# interfaces configured for the same subnet, then the
# network address alone is not sufficient to identify
# the interface Corosync should bind to. In that case,
# configure the *host* address of the interface
# instead:
# bindnetaddr: 192.168.1.1
# When selecting a multicast address, consider RFC
# 2365 (which, among other things, specifies that
# 239.255.x.x addresses are left to the discretion of
# the network administrator). Do not reuse multicast
# addresses across multiple Corosync clusters sharing
# the same network.
# mcastaddr: 239.255.1.1
# Corosync uses the port you specify here for UDP
# messaging, and also the immediately preceding
# port. Thus if you set this to 5405, Corosync sends
# messages over UDP ports 5405 and 5404.
mcastport: 5405
# Time-to-live for cluster communication packets. The
# number of hops (routers) that this ring will allow
# itself to pass. Note that multicast routing must be
# specifically enabled on most network routers.
ttl: 1
}
}
logging {
# Log the source file and line where messages are being
# generated. When in doubt, leave off. Potentially useful for
# debugging.
fileline: off
# Log to standard error. When in doubt, set to no. Useful when
# running in the foreground (when invoking "corosync -f")
to_stderr: no
# Log to a log file. When set to "no", the "logfile" option
# must not be set.
to_logfile: no
#logfile: /var/log/corosync/corosync.log
# Log to the system log daemon. When in doubt, set to yes.
to_syslog: yes
# Log with syslog facility daemon.
syslog_facility: daemon
# Log debug messages (very verbose). When in doubt, leave off.
debug: off
# Log messages with time stamps. When in doubt, set to on
# (unless you are only logging to syslog, where double
# timestamps can be annoying).
timestamp: on
logger_subsys {
subsys: QUORUM
debug: off
}
}
quorum {
# Enable and configure quorum subsystem (default: off)
# see also corosync.conf.5 and votequorum.5
provider: corosync_votequorum
expected_votes: 2
}
...@@ -27,8 +27,7 @@ usr/share/doc/corosync/AUTHORS ...@@ -27,8 +27,7 @@ usr/share/doc/corosync/AUTHORS
usr/share/doc/corosync/INSTALL usr/share/doc/corosync/INSTALL
usr/share/augeas/lenses/corosync.aug usr/share/augeas/lenses/corosync.aug
usr/share/augeas/lenses/tests/test_corosync.aug usr/share/augeas/lenses/tests/test_corosync.aug
etc/corosync/corosync.*example* usr/share/doc/corosync/examples etc/corosync/corosync.conf
etc/corosync/uidgid.d etc/corosync/uidgid.d
debian/corosync.conf etc/corosync
usr/share/corosync/xml2conf.xsl usr/share/corosync/xml2conf.xsl
var/lib/corosync var/lib/corosync
From: =?utf-8?q?Ferenc_W=C3=A1gner?= <wferi@debian.org>
Date: Sun, 16 Dec 2018 22:51:46 +0100
Subject: Make the example config valid
---
conf/corosync.conf.example | 24 +++++++++---------------
1 file changed, 9 insertions(+), 15 deletions(-)
diff --git a/conf/corosync.conf.example b/conf/corosync.conf.example
index 44827a9..91de572 100644
--- a/conf/corosync.conf.example
+++ b/conf/corosync.conf.example
@@ -1,7 +1,11 @@
# Please read the corosync.conf.5 manual page
totem {
- # Set name of the cluster
- cluster_name: ExampleCluster
+ version: 2
+
+ # Corosync itself works without a cluster name, but DLM needs one.
+ # The cluster name is also written into the VG metadata of newly
+ # created shared LVM volume groups, if lvmlockd uses DLM locking.
+ cluster_name: debian
# crypto_cipher and crypto_hash: Used for mutual node authentication.
# If you choose to enable this, then do remember to create a shared
@@ -23,7 +27,7 @@ logging {
# Log to a log file. When set to "no", the "logfile" option
# must not be set.
to_logfile: yes
- logfile: /var/log/cluster/corosync.log
+ logfile: /var/log/corosync/corosync.log
# Log to the system log daemon. When in doubt, set to yes.
to_syslog: yes
# Log debug messages (very verbose). When in doubt, leave off.
@@ -39,7 +43,7 @@ logging {
quorum {
# Enable and configure quorum subsystem (default: off)
# see also corosync.conf.5 and votequorum.5
- #provider: corosync_votequorum
+ provider: corosync_votequorum
}
nodelist {
@@ -51,19 +55,9 @@ nodelist {
# Cluster membership node identifier
nodeid: 1
# Address of first link
- #ring0_addr: 192.168.0.1
+ ring0_addr: 127.0.0.1
# When knet transport is used it's possible to define up to 8 links
#ring1_addr: 192.168.1.1
}
- node {
- # Hostname of the node
- name: node2
- # Cluster membership node identifier
- nodeid: 2
- # Address of first link
- #ring0_addr: 192.168.0.2
- # When knet transport is used it's possible to define up to 8 links
- #ring1_addr: 192.168.1.2
- }
# ...
}
From: =?utf-8?q?Ferenc_W=C3=A1gner?= <wferi@niif.hu>
Date: Tue, 25 Aug 2015 14:14:03 +0200
Subject: Substitute LOGDIR into the example configs
Closes: #739730
---
conf/Makefile.am | 8 +++++++-
conf/{corosync.conf.example => corosync.conf.example.in} | 2 +-
2 files changed, 8 insertions(+), 2 deletions(-)
rename conf/{corosync.conf.example => corosync.conf.example.in} (97%)
diff --git a/conf/Makefile.am b/conf/Makefile.am
index 44581eb..a5e67c4 100644
--- a/conf/Makefile.am
+++ b/conf/Makefile.am
@@ -31,8 +31,10 @@
MAINTAINERCLEANFILES = Makefile.in
+CLEANFILES = $(corosysconf_DATA)
+
EXTRA_DIST = COROSYNC-MIB.txt corosync-signals.conf \
- corosync.conf.example \
+ corosync.conf.example.in \
xml2conf.xsl \
lenses/corosync.aug \
lenses/tests/test_corosync.aug
@@ -41,6 +43,10 @@ corosysconfdir = ${COROSYSCONFDIR}
corosysconf_DATA = corosync.conf.example
+%: %.in Makefile
+ sed -e 's,[@]LOGDIR[@],$(LOGDIR),g' \
+ < $(srcdir)/$< > $@
+
if INSTALL_AUGEAS
corolensdir = ${datadir}/augeas/lenses
corolens_DATA = lenses/corosync.aug
diff --git a/conf/corosync.conf.example b/conf/corosync.conf.example.in
similarity index 97%
rename from conf/corosync.conf.example
rename to conf/corosync.conf.example.in
index 44827a9..cc8b2f0 100644
--- a/conf/corosync.conf.example
+++ b/conf/corosync.conf.example.in
@@ -23,7 +23,7 @@ logging {
# Log to a log file. When set to "no", the "logfile" option
# must not be set.
to_logfile: yes
- logfile: /var/log/cluster/corosync.log
+ logfile: @LOGDIR@/corosync.log
# Log to the system log daemon. When in doubt, set to yes.
to_syslog: yes
# Log debug messages (very verbose). When in doubt, leave off.
Fix-various-typos-in-ChangeLog.patch Fix-various-typos-in-ChangeLog.patch
Substitute-LOGDIR-into-the-example-configs.patch
Enable-PrivateTmp-in-the-systemd-service-files.patch Enable-PrivateTmp-in-the-systemd-service-files.patch
Make-the-example-config-valid.patch
...@@ -54,8 +54,11 @@ override_dh_auto_test-indep: ...@@ -54,8 +54,11 @@ override_dh_auto_test-indep:
override_dh_auto_install-indep: override_dh_auto_install-indep:
$(MAKE) -C man DESTDIR="$(CURDIR)/debian/tmp" install $(MAKE) -C man DESTDIR="$(CURDIR)/debian/tmp" install
CONF=debian/tmp/etc/corosync/corosync.conf
override_dh_auto_install-arch: override_dh_auto_install-arch:
dh_auto_install dh_auto_install
# We patched the example into a working config file:
mv -v $(CONF).example $(CONF)
rm -v debian/tmp/usr/lib/*/lib*.la rm -v debian/tmp/usr/lib/*/lib*.la
# we don't need the upstream license # we don't need the upstream license
rm debian/tmp/usr/share/doc/corosync/LICENSE rm debian/tmp/usr/share/doc/corosync/LICENSE
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment