Procházet zdrojové kódy

config example: Migrate to newer syntax

Default config is knet with nodelist so extra udpu example is no longer
needed.

XML variant of corosync config never got expected usage, so delete
example config too.

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Christine Caulfield <ccaulfie@redhat.com>
Jan Friesse před 7 roky
rodič
revize
fa4289bcbf

+ 1 - 7
conf/Makefile.am

@@ -33,16 +33,13 @@ MAINTAINERCLEANFILES    = Makefile.in
 
 
 EXTRA_DIST		= COROSYNC-MIB.txt corosync-signals.conf \
 EXTRA_DIST		= COROSYNC-MIB.txt corosync-signals.conf \
 			  corosync.conf.example \
 			  corosync.conf.example \
-			  corosync.conf.example.udpu \
-			  corosync.xml.example \
 			  xml2conf.xsl \
 			  xml2conf.xsl \
 			  lenses/corosync.aug \
 			  lenses/corosync.aug \
 			  lenses/tests/test_corosync.aug
 			  lenses/tests/test_corosync.aug
 
 
 corosysconfdir		= ${COROSYSCONFDIR}
 corosysconfdir		= ${COROSYSCONFDIR}
 
 
-corosysconf_DATA	= corosync.conf.example \
-			  corosync.conf.example.udpu
+corosysconf_DATA	= corosync.conf.example
 
 
 if INSTALL_AUGEAS
 if INSTALL_AUGEAS
 corolensdir		= ${datadir}/augeas/lenses
 corolensdir		= ${datadir}/augeas/lenses
@@ -53,9 +50,6 @@ corolenstest_DATA	= lenses/tests/test_corosync.aug
 endif
 endif
 
 
 if INSTALL_XMLCONF
 if INSTALL_XMLCONF
-corosysxmlconfdir	= ${COROSYSCONFDIR}
-corosysxmlconf_DATA	= corosync.xml.example
-
 corosysxmlxsltdir	= ${datadir}/corosync
 corosysxmlxsltdir	= ${datadir}/corosync
 corosysxmlxslt_DATA	= xml2conf.xsl
 corosysxmlxslt_DATA	= xml2conf.xsl
 endif
 endif

+ 31 - 43
conf/corosync.conf.example

@@ -1,51 +1,15 @@
 # Please read the corosync.conf.5 manual page
 # Please read the corosync.conf.5 manual page
 totem {
 totem {
-	version: 2
+	# Set name of the cluster
+	cluster_name: ExampleCluster
 
 
 	# crypto_cipher and crypto_hash: Used for mutual node authentication.
 	# crypto_cipher and crypto_hash: Used for mutual node authentication.
 	# If you choose to enable this, then do remember to create a shared
 	# If you choose to enable this, then do remember to create a shared
 	# secret with "corosync-keygen".
 	# secret with "corosync-keygen".
 	# enabling crypto_cipher, requires also enabling of crypto_hash.
 	# enabling crypto_cipher, requires also enabling of crypto_hash.
+	# crypto works only with knet transport
 	crypto_cipher: none
 	crypto_cipher: none
 	crypto_hash: none
 	crypto_hash: none
-
-	# 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: 192.168.1.0
-		# 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 from UDP port 5404 to UDP port 5405.
-		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 {
 logging {
@@ -53,9 +17,9 @@ logging {
 	# generated. When in doubt, leave off. Potentially useful for
 	# generated. When in doubt, leave off. Potentially useful for
 	# debugging.
 	# debugging.
 	fileline: off
 	fileline: off
-	# Log to standard error. When in doubt, set to no. Useful when
+	# Log to standard error. When in doubt, set to yes. Useful when
 	# running in the foreground (when invoking "corosync -f")
 	# running in the foreground (when invoking "corosync -f")
-	to_stderr: no
+	to_stderr: yes
 	# Log to a log file. When set to "no", the "logfile" option
 	# Log to a log file. When set to "no", the "logfile" option
 	# must not be set.
 	# must not be set.
 	to_logfile: yes
 	to_logfile: yes
@@ -65,8 +29,6 @@ logging {
 	# Log debug messages (very verbose). When in doubt, leave off.
 	# Log debug messages (very verbose). When in doubt, leave off.
 	debug: off
 	debug: off
 	# Log messages with time stamps. When in doubt, set to on
 	# 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
 	timestamp: on
 	logger_subsys {
 	logger_subsys {
 		subsys: QUORUM
 		subsys: QUORUM
@@ -79,3 +41,29 @@ quorum {
 	# see also corosync.conf.5 and votequorum.5
 	# see also corosync.conf.5 and votequorum.5
 	#provider: corosync_votequorum
 	#provider: corosync_votequorum
 }
 }
+
+nodelist {
+	# Change/uncomment/add node sections to match cluster configuration
+
+	node {
+		# Hostname of the node
+		name: node1
+		# Cluster membership node identifier
+		nodeid: 1
+		# Address of first link
+		#ring0_addr: 192.168.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
+	}
+	# ...
+}

+ 0 - 58
conf/corosync.conf.example.udpu

@@ -1,58 +0,0 @@
-# Please read the corosync.conf.5 manual page
-totem {
-	version: 2
-
-	crypto_cipher: none
-	crypto_hash: none
-
-	interface {
-		ringnumber: 0
-		bindnetaddr: 10.16.35.0
-		mcastport: 5405
-		ttl: 1
-	}
-	transport: udpu
-}
-
-logging {
-	fileline: off
-	to_logfile: yes
-	to_syslog: yes
-	logfile: /var/log/cluster/corosync.log
-	debug: off
-	timestamp: on
-	logger_subsys {
-		subsys: QUORUM
-		debug: off
-	}
-}
-
-nodelist {
-	node {
-		ring0_addr: 10.16.35.101
-		nodeid: 1
-	}
-
-	node {
-		ring0_addr: 10.16.35.102
-		nodeid: 2
-	}
-
-	node {
-		ring0_addr: 10.16.35.103
-	}
-
-	node {
-		ring0_addr: 10.16.35.104
-	}
-
-	node {
-		ring0_addr: 10.16.35.105
-	}
-}
-
-quorum {
-	# Enable and configure quorum subsystem (default: off)
-	# see also corosync.conf.5 and votequorum.5
-	#provider: corosync_votequorum
-}

+ 0 - 110
conf/corosync.xml.example

@@ -1,110 +0,0 @@
-<?xml version="1.0"?>
-
-<!--
-    Please read the corosync.xml.5 and corosync.conf.5 manual page
--->
-
-<corosync>
-
-<!--
-    totem tag configures behavior of totem and interfaces.
-
-    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.
--->
-<totem version="2" crypto_cipher="none" crypto_hash="none">
-    <!--
-	interface tag to define at least one interface to communicate
-	over. If you define more than one interface stanza, you must
-	also set rrp_mode.
-
-	Main parameters:
-	ringnumber:
-	    Rings must be consecutively numbered, starting at 0.
-
-	bindnetaddr:
-	    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.
-
-	    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"
-
-	mcastaddr:
-	    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.
-
-	mcastport:
-	    Corosync uses the port you specify here for UDP
-	    messaging, and also the immediately preceding
-	    port. Thus if you set this to 5405, Corosync send
-	    messages over UDP ports 5405 and 5404.
-
-	ttl:
-	    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.
-    -->
-
-	<interface ringnumber="0" bindnetaddr="192.168.1.0" mcastaddr="239.255.1.1"
-	    mcastport="5405" ttl="1" />
-</totem>
-
-<!--
-    Logging tag for defining various logging options
-
-    Main parameters:
-    fileline:
-	Log the source file and line where messages are being
-	generated. When in doubt, leave off. Potentially useful for
-	debugging.
-
-    to_stderr:
-	Log to standard error. When in doubt, set to no. Useful when
-	running in the foreground (when invoking "corosync -f")
-
-    to_logfile:
-    logfile:
-	Log to a log file. When set to "no", the "logfile" option
-	must not be set.
-
-    to_syslog:
-	Log to the system log daemon. When in doubt, set to yes.
-
-    debug:
-	Log debug messages (very verbose). When in doubt, leave off.
-
-    timestamp:
-	Log messages with time stamps. When in doubt, set to on
-	(unless you are only logging to syslog, where double
-	timestamps can be annoying).
-
--->
-
-<logging fileline="off" to_stderr="no" to_logfile="yes"
-    logfile="/var/log/cluster/corosync.log" to_syslog="yes" debug="off"
-    timestamp="on">
-
-    <!--
-	Logger susys tag is used to overwrite default settings for given
-	subsys if needed.
-    -->
-
-    <logger_subsys subsys="QUORUM" debug="off" />
-</logging>
-
-</corosync>

+ 0 - 2
corosync.spec.in

@@ -162,7 +162,6 @@ fi
 %{_bindir}/corosync-blackbox
 %{_bindir}/corosync-blackbox
 %if %{with xmlconf}
 %if %{with xmlconf}
 %{_bindir}/corosync-xmlproc
 %{_bindir}/corosync-xmlproc
-%config(noreplace) %{_sysconfdir}/corosync/corosync.xml.example
 %dir %{_datadir}/corosync
 %dir %{_datadir}/corosync
 %{_datadir}/corosync/xml2conf.xsl
 %{_datadir}/corosync/xml2conf.xsl
 %{_mandir}/man8/corosync-xmlproc.8*
 %{_mandir}/man8/corosync-xmlproc.8*
@@ -171,7 +170,6 @@ fi
 %dir %{_sysconfdir}/corosync
 %dir %{_sysconfdir}/corosync
 %dir %{_sysconfdir}/corosync/uidgid.d
 %dir %{_sysconfdir}/corosync/uidgid.d
 %config(noreplace) %{_sysconfdir}/corosync/corosync.conf.example
 %config(noreplace) %{_sysconfdir}/corosync/corosync.conf.example
-%config(noreplace) %{_sysconfdir}/corosync/corosync.conf.example.udpu
 %config(noreplace) %{_sysconfdir}/sysconfig/corosync-notifyd
 %config(noreplace) %{_sysconfdir}/sysconfig/corosync-notifyd
 %config(noreplace) %{_sysconfdir}/sysconfig/corosync
 %config(noreplace) %{_sysconfdir}/sysconfig/corosync
 %config(noreplace) %{_sysconfdir}/logrotate.d/corosync
 %config(noreplace) %{_sysconfdir}/logrotate.d/corosync