From 8690b71a25db8ec0be6622eddc821325cdab053a Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Mar 31 2020 09:38:21 +0000 Subject: import corosync-2.4.5-4.el7 --- diff --git a/.corosync.metadata b/.corosync.metadata index 8426d9a..2df3914 100644 --- a/.corosync.metadata +++ b/.corosync.metadata @@ -1,2 +1,2 @@ -76eea6fe72f933628b3a6ae88cc437c3e8f770d7 SOURCES/corosync-2.4.3.tar.gz -3c1904b844ec7e1b96f47ef92e4da2d99441c5f0 SOURCES/spausedd-20190320.tar.gz +3866fd3eaf9990667cb294da96ce80ab3f39744a SOURCES/corosync-2.4.5.tar.gz +87cb5c01333298d106fc0022f5ac855205da0ae6 SOURCES/spausedd-20190807.tar.gz diff --git a/.gitignore b/.gitignore index 5f4db70..0adb89a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,2 @@ -SOURCES/corosync-2.4.3.tar.gz -SOURCES/spausedd-20190320.tar.gz +SOURCES/corosync-2.4.5.tar.gz +SOURCES/spausedd-20190807.tar.gz diff --git a/SOURCES/bz1376819-1-configure-add-with-initconfigdir-option.patch b/SOURCES/bz1376819-1-configure-add-with-initconfigdir-option.patch deleted file mode 100644 index 65a695d..0000000 --- a/SOURCES/bz1376819-1-configure-add-with-initconfigdir-option.patch +++ /dev/null @@ -1,277 +0,0 @@ -From c0d8af0c7b247df16a90850b0edab4f978cb8192 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Ferenc=20W=C3=A1gner?= -Date: Thu, 24 Nov 2016 12:06:37 +0100 -Subject: [PATCH] configure: add --with-initconfigdir option -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Default value is /etc/sysconfig and resulting -INITCONFIGDIR is used to reduce duplication in init system -integration code. - -Signed-off-by: Ferenc Wágner -Reviewed-by: Jan Friesse -(cherry picked from commit d7208e88370d2bce40b45224a3971eeb68c22d3c) ---- - configure.ac | 8 ++++++++ - init/Makefile.am | 1 + - init/corosync-notifyd.conf.in | 12 ++++-------- - init/corosync-notifyd.in | 4 ++-- - init/corosync-notifyd.service.in | 2 +- - init/corosync-qdevice.in | 4 ++-- - init/corosync-qnetd.in | 4 ++-- - init/corosync-qnetd.service.in | 2 +- - init/corosync.conf.in | 15 +++++---------- - init/corosync.in | 4 ++-- - 10 files changed, 28 insertions(+), 28 deletions(-) - -diff --git a/configure.ac b/configure.ac -index e60bf1b..01f7aa5 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -364,6 +364,13 @@ AC_ARG_ENABLE([upstart], - [ enable_upstart="no" ]) - AM_CONDITIONAL(INSTALL_UPSTART, test x$enable_upstart = xyes) - -+AC_ARG_WITH([initconfigdir], -+ [AS_HELP_STRING([--with-initconfigdir=DIR], -+ [configuration directory @<:@SYSCONFDIR/sysconfig@:>@])], -+ [INITCONFIGDIR="$withval"], -+ [INITCONFIGDIR='${sysconfdir}/sysconfig']) -+AC_SUBST([INITCONFIGDIR]) -+ - AC_ARG_WITH([initddir], - [ --with-initddir=DIR : path to init script directory. ], - [ INITDDIR="$withval" ], -@@ -771,6 +778,7 @@ AC_MSG_RESULT([ System tmpfiles.d = ${TMPFILESDIR}]) - AC_MSG_RESULT([ Log directory = ${LOGDIR}]) - AC_MSG_RESULT([ Log rotate directory = ${LOGROTATEDIR}]) - AC_MSG_RESULT([ corosync config dir = ${COROSYSCONFDIR}]) -+AC_MSG_RESULT([ init config directory = ${INITCONFIGDIR}]) - AC_MSG_RESULT([ Features =${PACKAGE_FEATURES}]) - AC_MSG_RESULT([]) - AC_MSG_RESULT([$PACKAGE build info:]) -diff --git a/init/Makefile.am b/init/Makefile.am -index 379249f..3161979 100644 ---- a/init/Makefile.am -+++ b/init/Makefile.am -@@ -76,6 +76,7 @@ endif - -e 's#@''SBINDIR@#$(sbindir)#g' \ - -e 's#@''BINDIR@#$(bindir)#g' \ - -e 's#@''SYSCONFDIR@#$(sysconfdir)#g' \ -+ -e 's#@''INITCONFIGDIR@#$(INITCONFIGDIR)#g' \ - -e 's#@''INITDDIR@#$(INITDDIR)#g' \ - -e 's#@''INITWRAPPERSDIR@#$(INITWRAPPERSDIR)#g' \ - -e 's#@''LOCALSTATEDIR@#$(localstatedir)#g' \ -diff --git a/init/corosync-notifyd.conf.in b/init/corosync-notifyd.conf.in -index b1ac70c..168a781 100644 ---- a/init/corosync-notifyd.conf.in -+++ b/init/corosync-notifyd.conf.in -@@ -6,14 +6,12 @@ expect fork - respawn - - env prog=corosync-notifyd --env rpm_sysconf=@SYSCONFDIR@/sysconfig/corosync-notifyd -+env initconf=@INITCONFIGDIR@/corosync-notifyd - env rpm_lockfile=@LOCALSTATEDIR@/lock/subsys/corosync-notifyd --env deb_sysconf=@SYSCONFDIR@/default/corosync-notifyd - env deb_lockfile=@LOCALSTATEDIR@/lock/corosync-notifyd - - script -- [ -f "$rpm_sysconf" ] && . $rpm_sysconf -- [ -f "$deb_sysconf" ] && . $deb_sysconf -+ [ -f "$initconf" ] && . $initconf - exec $prog $OPTIONS - end script - -@@ -22,16 +20,14 @@ pre-start script - end script - - post-start script -- [ -f "$rpm_sysconf" ] && . $rpm_sysconf -- [ -f "$deb_sysconf" ] && . $deb_sysconf -+ [ -f "$initconf" ] && . $initconf - [ -z "$LOCK_FILE" -a -d @SYSCONFDIR@/sysconfig ] && LOCK_FILE="$rpm_lockfile" - [ -z "$LOCK_FILE" -a -d @SYSCONFDIR@/default ] && LOCK_FILE="$deb_lockfile" - touch $LOCK_FILE - end script - - post-stop script -- [ -f "$rpm_sysconf" ] && . $rpm_sysconf -- [ -f "$deb_sysconf" ] && . $deb_sysconf -+ [ -f "$initconf" ] && . $initconf - [ -z "$LOCK_FILE" -a -d @SYSCONFDIR@/sysconfig ] && LOCK_FILE="$rpm_lockfile" - [ -z "$LOCK_FILE" -a -d @SYSCONFDIR@/default ] && LOCK_FILE="$deb_lockfile" - rm -f $LOCK_FILE -diff --git a/init/corosync-notifyd.in b/init/corosync-notifyd.in -index 3711821..cc7fa78 100755 ---- a/init/corosync-notifyd.in -+++ b/init/corosync-notifyd.in -@@ -47,16 +47,16 @@ status() - return $rtrn - } - -+[ -f @INITCONFIGDIR@/$prog ] && . @INITCONFIGDIR@/$prog -+ - # rpm based distros - if [ -d @SYSCONFDIR@/sysconfig ]; then - [ -f @INITDDIR@/functions ] && . @INITDDIR@/functions -- [ -f @SYSCONFDIR@/sysconfig/$prog ] && . @SYSCONFDIR@/sysconfig/$prog - [ -z "$LOCK_FILE" ] && LOCK_FILE="@LOCALSTATEDIR@/lock/subsys/$prog" - fi - - # deb based distros - if [ -d @SYSCONFDIR@/default ]; then -- [ -f @SYSCONFDIR@/default/$prog ] && . @SYSCONFDIR@/default/$prog - [ -z "$LOCK_FILE" ] && LOCK_FILE="@LOCALSTATEDIR@/lock/$prog" - fi - -diff --git a/init/corosync-notifyd.service.in b/init/corosync-notifyd.service.in -index 689ab8e..f74ca33 100644 ---- a/init/corosync-notifyd.service.in -+++ b/init/corosync-notifyd.service.in -@@ -5,7 +5,7 @@ Wants=corosync.service - After=corosync.service - - [Service] --EnvironmentFile=@SYSCONFDIR@/sysconfig/corosync-notifyd -+EnvironmentFile=-@INITCONFIGDIR@/corosync-notifyd - ExecStart=@SBINDIR@/corosync-notifyd -f $OPTIONS - Type=simple - Restart=on-failure -diff --git a/init/corosync-qdevice.in b/init/corosync-qdevice.in -index 913e033..864cdfa 100755 ---- a/init/corosync-qdevice.in -+++ b/init/corosync-qdevice.in -@@ -47,16 +47,16 @@ status() - return $res - } - -+[ -f @INITCONFIGDIR@/$prog ] && . @INITCONFIGDIR@/$prog -+ - # rpm based distros - if [ -d @SYSCONFDIR@/sysconfig ]; then - [ -f @INITDDIR@/functions ] && . @INITDDIR@/functions -- [ -f @SYSCONFDIR@/sysconfig/$prog ] && . @SYSCONFDIR@/sysconfig/$prog - [ -z "$LOCK_FILE" ] && LOCK_FILE="@LOCALSTATEDIR@/lock/subsys/$prog" - fi - - # deb based distros - if [ -d @SYSCONFDIR@/default ]; then -- [ -f @SYSCONFDIR@/default/$prog ] && . @SYSCONFDIR@/default/$prog - [ -z "$LOCK_FILE" ] && LOCK_FILE="@LOCALSTATEDIR@/lock/$prog" - fi - -diff --git a/init/corosync-qnetd.in b/init/corosync-qnetd.in -index 15d30ea..beee03a 100755 ---- a/init/corosync-qnetd.in -+++ b/init/corosync-qnetd.in -@@ -47,16 +47,16 @@ status() - return $res - } - -+[ -f @INITCONFIGDIR@/$prog ] && . @INITCONFIGDIR@/$prog -+ - # rpm based distros - if [ -d @SYSCONFDIR@/sysconfig ]; then - [ -f @INITDDIR@/functions ] && . @INITDDIR@/functions -- [ -f @SYSCONFDIR@/sysconfig/$prog ] && . @SYSCONFDIR@/sysconfig/$prog - [ -z "$LOCK_FILE" ] && LOCK_FILE="@LOCALSTATEDIR@/lock/subsys/$prog" - fi - - # deb based distros - if [ -d @SYSCONFDIR@/default ]; then -- [ -f @SYSCONFDIR@/default/$prog ] && . @SYSCONFDIR@/default/$prog - [ -z "$LOCK_FILE" ] && LOCK_FILE="@LOCALSTATEDIR@/lock/$prog" - fi - -diff --git a/init/corosync-qnetd.service.in b/init/corosync-qnetd.service.in -index c6cf8c9..cae98fe 100644 ---- a/init/corosync-qnetd.service.in -+++ b/init/corosync-qnetd.service.in -@@ -6,7 +6,7 @@ Requires=network-online.target - After=network-online.target - - [Service] --EnvironmentFile=@SYSCONFDIR@/sysconfig/corosync-qnetd -+EnvironmentFile=-@INITCONFIGDIR@/corosync-qnetd - ExecStart=@BINDIR@/corosync-qnetd -f $COROSYNC_QNETD_OPTIONS - Type=simple - Restart=on-abnormal -diff --git a/init/corosync.conf.in b/init/corosync.conf.in -index 373565a..0352d2b 100644 ---- a/init/corosync.conf.in -+++ b/init/corosync.conf.in -@@ -5,14 +5,12 @@ - expect fork - - env prog=corosync --env rpm_sysconf=@SYSCONFDIR@/sysconfig/corosync -+env initconf=@INITCONFIGDIR@/corosync - env rpm_lockfile=@LOCALSTATEDIR@/lock/subsys/corosync --env deb_sysconf=@SYSCONFDIR@/default/corosync - env deb_lockfile=@LOCALSTATEDIR@/lock/corosync - - script -- [ -f "$rpm_sysconf" ] && . $rpm_sysconf -- [ -f "$deb_sysconf" ] && . $deb_sysconf -+ [ -f "$initconf" ] && . $initconf - exec $prog $COROSYNC_OPTIONS - end script - -@@ -25,8 +23,7 @@ end script - post-start script - wait_for_ipc() - { -- [ -f "$rpm_sysconf" ] && . $rpm_sysconf -- [ -f "$deb_sysconf" ] && . $deb_sysconf -+ [ -f "$initconf" ] && . $initconf - try=0 - max_try=$((COROSYNC_INIT_TIMEOUT*2-1)) - [ "$max_try" -le "0" ] && max_try=120 -@@ -43,16 +40,14 @@ wait_for_ipc() - } - wait_for_ipc || { stop; exit 1; } - -- [ -f "$rpm_sysconf" ] && . $rpm_sysconf -- [ -f "$deb_sysconf" ] && . $deb_sysconf -+ [ -f "$initconf" ] && . $initconf - [ -z "$LOCK_FILE" -a -d @SYSCONFDIR@/sysconfig ] && LOCK_FILE="$rpm_lockfile" - [ -z "$LOCK_FILE" -a -d @SYSCONFDIR@/default ] && LOCK_FILE="$deb_lockfile" - touch $LOCK_FILE - end script - - post-stop script -- [ -f "$rpm_sysconf" ] && . $rpm_sysconf -- [ -f "$deb_sysconf" ] && . $deb_sysconf -+ [ -f "$initconf" ] && . $initconf - [ -z "$LOCK_FILE" -a -d @SYSCONFDIR@/sysconfig ] && LOCK_FILE="$rpm_lockfile" - [ -z "$LOCK_FILE" -a -d @SYSCONFDIR@/default ] && LOCK_FILE="$deb_lockfile" - rm -f $LOCK_FILE -diff --git a/init/corosync.in b/init/corosync.in -index c93f971..a258c36 100755 ---- a/init/corosync.in -+++ b/init/corosync.in -@@ -48,16 +48,16 @@ status() - return $res - } - -+[ -f @INITCONFIGDIR@/$prog ] && . @INITCONFIGDIR@/$prog -+ - # rpm based distros - if [ -d @SYSCONFDIR@/sysconfig ]; then - [ -f @INITDDIR@/functions ] && . @INITDDIR@/functions -- [ -f @SYSCONFDIR@/sysconfig/$prog ] && . @SYSCONFDIR@/sysconfig/$prog - [ -z "$LOCK_FILE" ] && LOCK_FILE="@LOCALSTATEDIR@/lock/subsys/$prog" - fi - - # deb based distros - if [ -d @SYSCONFDIR@/default ]; then -- [ -f @SYSCONFDIR@/default/$prog ] && . @SYSCONFDIR@/default/$prog - [ -z "$LOCK_FILE" ] && LOCK_FILE="@LOCALSTATEDIR@/lock/$prog" - fi - --- -1.8.3.1 - diff --git a/SOURCES/bz1376819-2-Use-RuntimeDirectory-instead-of-tmpfiles.d.patch b/SOURCES/bz1376819-2-Use-RuntimeDirectory-instead-of-tmpfiles.d.patch deleted file mode 100644 index 4ecd66a..0000000 --- a/SOURCES/bz1376819-2-Use-RuntimeDirectory-instead-of-tmpfiles.d.patch +++ /dev/null @@ -1,194 +0,0 @@ -From fde7fa0c6408709ccdd090aa9064e6a78232498a Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Ferenc=20W=C3=A1gner?= -Date: Mon, 28 Nov 2016 14:47:05 +0100 -Subject: [PATCH] Use RuntimeDirectory instead of tmpfiles.d -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -This reverts part of commit 32123f6bb2ebc4f9ac7865945cc85a9c9b903dc6. - -A simple directive is a much lighter solution to the same problem, and -automatically follows the specified User. I copied the 0770 modes from -the corresponding init scripts; they could use a little documentation. - -Signed-off-by: Ferenc Wágner -Reviewed-by: Jan Friesse -(cherry picked from commit c733e9417ef1d2f31268e9b6f99a8fc7712fcea7) ---- - conf/Makefile.am | 2 +- - conf/tmpfiles.d/Makefile.am | 40 ------------------------------------- - conf/tmpfiles.d/corosync-qnetd.conf | 1 - - configure.ac | 10 +--------- - corosync.spec.in | 6 +----- - init/corosync-qdevice.service.in | 2 ++ - init/corosync-qnetd.service.in | 2 ++ - 7 files changed, 7 insertions(+), 56 deletions(-) - delete mode 100644 conf/tmpfiles.d/Makefile.am - delete mode 100644 conf/tmpfiles.d/corosync-qnetd.conf - -diff --git a/conf/Makefile.am b/conf/Makefile.am -index 6382386..807b6cc 100644 ---- a/conf/Makefile.am -+++ b/conf/Makefile.am -@@ -70,4 +70,4 @@ dbusdir = $(sysconfdir)/dbus-1/system.d - dbus_DATA = corosync-signals.conf - endif - --SUBDIRS = logrotate tmpfiles.d -+SUBDIRS = logrotate -diff --git a/conf/tmpfiles.d/Makefile.am b/conf/tmpfiles.d/Makefile.am -deleted file mode 100644 -index 653129a..0000000 ---- a/conf/tmpfiles.d/Makefile.am -+++ /dev/null -@@ -1,40 +0,0 @@ --# Copyright (c) 2016 Red Hat, Inc. --# --# Authors:Jan Friesse (jfriesse@redhat.com) --# --# This software licensed under BSD license, the text of which follows: --# --# Redistribution and use in source and binary forms, with or without --# modification, are permitted provided that the following conditions are met: --# --# - Redistributions of source code must retain the above copyright notice, --# this list of conditions and the following disclaimer. --# - Redistributions in binary form must reproduce the above copyright notice, --# this list of conditions and the following disclaimer in the documentation --# and/or other materials provided with the distribution. --# - Neither the name of the MontaVista Software, Inc. nor the names of its --# contributors may be used to endorse or promote products derived from this --# software without specific prior written permission. --# --# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" --# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE --# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE --# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE --# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR --# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF --# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS --# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN --# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) --# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF --# THE POSSIBILITY OF SUCH DAMAGE. -- --MAINTAINERCLEANFILES = Makefile.in -- --EXTRA_DIST = corosync-qnetd.conf -- --if BUILD_QNETD --if INSTALL_SYSTEMD --tmpfilesdirdir = ${TMPFILESDIR} --tmpfilesdir_DATA = corosync-qnetd.conf --endif --endif -diff --git a/conf/tmpfiles.d/corosync-qnetd.conf b/conf/tmpfiles.d/corosync-qnetd.conf -deleted file mode 100644 -index f4cbd03..0000000 ---- a/conf/tmpfiles.d/corosync-qnetd.conf -+++ /dev/null -@@ -1 +0,0 @@ --d /var/run/corosync-qnetd 0770 root root - -diff --git a/configure.ac b/configure.ac -index 01f7aa5..342da77 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -204,8 +204,7 @@ AC_CONFIG_FILES([Makefile - conf/Makefile - qdevices/Makefile - Doxyfile -- conf/logrotate/Makefile -- conf/tmpfiles.d/Makefile]) -+ conf/logrotate/Makefile]) - - ### Local business - -@@ -401,11 +400,6 @@ AC_ARG_WITH([logrotatedir], - [ LOGROTATEDIR="$withval" ], - [ LOGROTATEDIR="$sysconfdir/logrotate.d" ]) - --AC_ARG_WITH([tmpfilesdir], -- [ --with-tmpfilesdir=DIR : path to tmpfiles.d configuration files directory. ], -- [ TMPFILESDIR="$withval" ], -- [ TMPFILESDIR="/lib/tmpfiles.d" ]) -- - AC_ARG_ENABLE([snmp], - [ --enable-snmp : SNMP protocol support ], - [ default="no" ]) -@@ -731,7 +725,6 @@ INITWRAPPERSDIR=$(eval echo ${INITWRAPPERSDIR}) - AC_SUBST([INITWRAPPERSDIR]) - AC_SUBST([LOGDIR]) - AC_SUBST([LOGROTATEDIR]) --AC_SUBST([TMPFILESDIR]) - - AC_SUBST([SOMAJOR]) - AC_SUBST([SOMINOR]) -@@ -774,7 +767,6 @@ AC_MSG_RESULT([ System init.d directory = ${INITDDIR}]) - AC_MSG_RESULT([ System systemd directory = ${SYSTEMDDIR}]) - AC_MSG_RESULT([ System upstart directory = ${UPSTARTDIR}]) - AC_MSG_RESULT([ System init wraps dir = ${INITWRAPPERSDIR}]) --AC_MSG_RESULT([ System tmpfiles.d = ${TMPFILESDIR}]) - AC_MSG_RESULT([ Log directory = ${LOGDIR}]) - AC_MSG_RESULT([ Log rotate directory = ${LOGROTATEDIR}]) - AC_MSG_RESULT([ corosync config dir = ${COROSYSCONFDIR}]) -diff --git a/corosync.spec.in b/corosync.spec.in -index d101189..6e57c97 100644 ---- a/corosync.spec.in -+++ b/corosync.spec.in -@@ -134,8 +134,7 @@ export rdmacm_LIBS=-lrdmacm \ - %endif - --with-initddir=%{_initrddir} \ - --with-systemddir=%{_unitdir} \ -- --with-upstartdir=%{_sysconfdir}/init \ -- --with-tmpfilesdir=%{_tmpfilesdir} -+ --with-upstartdir=%{_sysconfdir}/init - - make %{_smp_mflags} - -@@ -176,8 +175,6 @@ install -m 644 init/corosync-qnetd.sysconfig.example \ - %if %{with systemd} - sed -i -e 's/^#User=/User=/' \ - %{buildroot}%{_unitdir}/corosync-qnetd.service --sed -i -e 's/root/coroqnetd/g' \ -- %{buildroot}%{_tmpfilesdir}/corosync-qnetd.conf - %else - sed -i -e 's/^COROSYNC_QNETD_RUNAS=""$/COROSYNC_QNETD_RUNAS="coroqnetd"/' \ - %{buildroot}%{_sysconfdir}/sysconfig/corosync-qnetd -@@ -503,7 +500,6 @@ fi - %{_unitdir}/corosync-qnetd.service - %dir %{_datadir}/corosync - %{_datadir}/corosync/corosync-qnetd --%{_tmpfilesdir}/corosync-qnetd.conf - %else - %{_initrddir}/corosync-qnetd - %endif -diff --git a/init/corosync-qdevice.service.in b/init/corosync-qdevice.service.in -index 8de4e5b..33746a0 100644 ---- a/init/corosync-qdevice.service.in -+++ b/init/corosync-qdevice.service.in -@@ -9,6 +9,8 @@ After=corosync.service - ExecStart=@INITWRAPPERSDIR@/corosync-qdevice start - ExecStop=@INITWRAPPERSDIR@/corosync-qdevice stop - Type=forking -+RuntimeDirectory=corosync-qdevice -+RuntimeDirectoryMode=0770 - - [Install] - WantedBy=multi-user.target -diff --git a/init/corosync-qnetd.service.in b/init/corosync-qnetd.service.in -index cae98fe..54b9849 100644 ---- a/init/corosync-qnetd.service.in -+++ b/init/corosync-qnetd.service.in -@@ -12,6 +12,8 @@ Type=simple - Restart=on-abnormal - # Uncomment and set user who should be used for executing qnetd - #User=coroqnetd -+RuntimeDirectory=corosync-qnetd -+RuntimeDirectoryMode=0770 - - [Install] - WantedBy=multi-user.target --- -1.8.3.1 - diff --git a/SOURCES/bz1376819-3-qnetd-Check-existence-of-NSS-DB-dir-before-fork.patch b/SOURCES/bz1376819-3-qnetd-Check-existence-of-NSS-DB-dir-before-fork.patch deleted file mode 100644 index 1268592..0000000 --- a/SOURCES/bz1376819-3-qnetd-Check-existence-of-NSS-DB-dir-before-fork.patch +++ /dev/null @@ -1,141 +0,0 @@ -From eac28dffdf7f060f41f2b2e95bb0f4c6c033425d Mon Sep 17 00:00:00 2001 -From: Jan Friesse -Date: Tue, 19 Mar 2019 14:40:12 +0100 -Subject: [PATCH] qnetd: Check existence of NSS DB dir before fork - -Previously, when user tried start corosync-qnetd without -initialized NSS database then generic (not very helpful -and misleading) NSS error was logged -"NSS error (-8015): The certificate/key database is in an old, -unsupported format.". - -Solution is to check if it's possible to open NSS DB directory and -display (usually much more informative) result of strerror function. - -Such check is called before fork, so init system can return error code -during start. - -To make error reporting work with systemd it's also needed to change -unit type from simple to forking. - -Signed-off-by: Jan Friesse -Reviewed-by: Christine Caulfield ---- - init/corosync-qnetd.service.in | 4 ++-- - qdevices/corosync-qnetd.c | 12 +++++++++++- - qdevices/nss-sock.c | 23 ++++++++++++++++++++++- - qdevices/nss-sock.h | 4 +++- - 4 files changed, 38 insertions(+), 5 deletions(-) - -diff --git a/init/corosync-qnetd.service.in b/init/corosync-qnetd.service.in -index 54b9849..8cff766 100644 ---- a/init/corosync-qnetd.service.in -+++ b/init/corosync-qnetd.service.in -@@ -7,8 +7,8 @@ After=network-online.target - - [Service] - EnvironmentFile=-@INITCONFIGDIR@/corosync-qnetd --ExecStart=@BINDIR@/corosync-qnetd -f $COROSYNC_QNETD_OPTIONS --Type=simple -+ExecStart=@BINDIR@/corosync-qnetd $COROSYNC_QNETD_OPTIONS -+Type=forking - Restart=on-abnormal - # Uncomment and set user who should be used for executing qnetd - #User=coroqnetd -diff --git a/qdevices/corosync-qnetd.c b/qdevices/corosync-qnetd.c -index 9af94b7..938e4ce 100644 ---- a/qdevices/corosync-qnetd.c -+++ b/qdevices/corosync-qnetd.c -@@ -1,5 +1,5 @@ - /* -- * Copyright (c) 2015-2016 Red Hat, Inc. -+ * Copyright (c) 2015-2019 Red Hat, Inc. - * - * All rights reserved. - * -@@ -543,6 +543,16 @@ main(int argc, char * const argv[]) - qnetd_log_set_priority_bump(bump_log_priority); - - /* -+ * Check that it's possible to open NSS dir if needed -+ */ -+ if (nss_sock_check_db_dir((tls_supported != TLV_TLS_UNSUPPORTED ? -+ advanced_settings.nss_db_dir : NULL)) != 0) { -+ qnetd_log_err(LOG_ERR, "Can't open NSS DB directory"); -+ -+ exit (1); -+ } -+ -+ /* - * Daemonize - */ - if (!foreground) { -diff --git a/qdevices/nss-sock.c b/qdevices/nss-sock.c -index 3c63927..483d417 100644 ---- a/qdevices/nss-sock.c -+++ b/qdevices/nss-sock.c -@@ -1,5 +1,5 @@ - /* -- * Copyright (c) 2015-2016 Red Hat, Inc. -+ * Copyright (c) 2015-2019 Red Hat, Inc. - * - * All rights reserved. - * -@@ -32,6 +32,9 @@ - * THE POSSIBILITY OF SUCH DAMAGE. - */ - -+#include -+ -+#include - #include - - #include "nss-sock.h" -@@ -56,6 +59,24 @@ nss_sock_init_nss(char *config_dir) - return (0); - } - -+int -+nss_sock_check_db_dir(const char *config_dir) -+{ -+ DIR *dirp; -+ -+ if (config_dir == NULL) { -+ return (0); -+ } -+ -+ if ((dirp = opendir(config_dir)) == NULL) { -+ return (-1); -+ } -+ -+ (void)closedir(dirp); -+ -+ return (0); -+} -+ - /* - * Set NSS socket non-blocking - */ -diff --git a/qdevices/nss-sock.h b/qdevices/nss-sock.h -index cc16d96..4f82e0a 100644 ---- a/qdevices/nss-sock.h -+++ b/qdevices/nss-sock.h -@@ -1,5 +1,5 @@ - /* -- * Copyright (c) 2015-2016 Red Hat, Inc. -+ * Copyright (c) 2015-2019 Red Hat, Inc. - * - * All rights reserved. - * -@@ -56,6 +56,8 @@ struct nss_sock_non_blocking_client { - - extern int nss_sock_init_nss(char *config_dir); - -+extern int nss_sock_check_db_dir(const char *config_dir); -+ - extern PRFileDesc *nss_sock_create_listen_socket(const char *hostname, uint16_t port, - PRIntn af); - --- -1.8.3.1 - diff --git a/SOURCES/bz1536219-1-logging-Make-blackbox-configurable.patch b/SOURCES/bz1536219-1-logging-Make-blackbox-configurable.patch deleted file mode 100644 index 983f9f3..0000000 --- a/SOURCES/bz1536219-1-logging-Make-blackbox-configurable.patch +++ /dev/null @@ -1,217 +0,0 @@ -From 8af39f66e56e319b6b93804c0400e6e29737a90f Mon Sep 17 00:00:00 2001 -From: Jan Friesse -Date: Mon, 22 Jan 2018 10:42:25 +0100 -Subject: [PATCH] logging: Make blackbox configurable - -Signed-off-by: Jan Friesse -Reviewed-by: Christine Caulfield -(cherry picked from commit 79dba9c51f60c603673f97afd07fa506fd9ae9a7) ---- - exec/logconfig.c | 40 +++++++++++++++++++++++++++++++++++++++- - exec/logsys.c | 44 ++++++++++++++++++++++++++++++++++---------- - exec/main.c | 1 + - include/corosync/logsys.h | 2 ++ - man/corosync.conf.5 | 6 ++++++ - 5 files changed, 82 insertions(+), 11 deletions(-) - -diff --git a/exec/logconfig.c b/exec/logconfig.c -index 6d0bed6..ccbffae 100644 ---- a/exec/logconfig.c -+++ b/exec/logconfig.c -@@ -127,7 +127,7 @@ static int insert_into_buffer( - } - - /* -- * format set is the only global specific option that -+ * format set is global specific option that - * doesn't apply at system/subsystem level. - */ - static int corosync_main_config_format_set ( -@@ -228,6 +228,40 @@ parse_error: - return (-1); - } - -+/* -+ * blackbox is another global specific option that -+ * doesn't apply at system/subsystem level. -+ */ -+static int corosync_main_config_blackbox_set ( -+ const char **error_string) -+{ -+ const char *error_reason; -+ char *value = NULL; -+ -+ if (map_get_string("logging.blackbox", &value) == CS_OK) { -+ if (strcmp (value, "on") == 0) { -+ (void)logsys_blackbox_set(QB_TRUE); -+ } else if (strcmp (value, "off") == 0) { -+ (void)logsys_blackbox_set(QB_FALSE); -+ } else { -+ error_reason = "unknown value for blackbox"; -+ free(value); -+ goto parse_error; -+ } -+ -+ free(value); -+ } else { -+ (void)logsys_blackbox_set(QB_TRUE); -+ } -+ -+ return (0); -+ -+parse_error: -+ *error_string = error_reason; -+ -+ return (-1); -+} -+ - static int corosync_main_config_log_destination_set ( - const char *path, - const char *key, -@@ -522,6 +556,10 @@ static int corosync_main_config_read_logging ( - goto parse_error; - } - -+ if (corosync_main_config_blackbox_set(&error_reason) < 0) { -+ goto parse_error; -+ } -+ - if (corosync_main_config_set ("logging", NULL, &error_reason) < 0) { - goto parse_error; - } -diff --git a/exec/logsys.c b/exec/logsys.c -index 6b4995d..a38cc5e 100644 ---- a/exec/logsys.c -+++ b/exec/logsys.c -@@ -119,6 +119,8 @@ static char *format_buffer=NULL; - - static int logsys_thread_started = 0; - -+static int logsys_blackbox_enabled = 1; -+ - static int _logsys_config_subsys_get_unlocked (const char *subsys) - { - unsigned int i; -@@ -309,7 +311,6 @@ int _logsys_system_setup( - int i; - int32_t fidx; - char tempsubsys[LOGSYS_MAX_SUBSYS_NAMELEN]; -- int blackbox_enable_res; - - if ((mainsystem == NULL) || - (strlen(mainsystem) >= LOGSYS_MAX_SUBSYS_NAMELEN)) { -@@ -371,7 +372,12 @@ int _logsys_system_setup( - QB_LOG_FILTER_FILE, "*", LOG_TRACE); - qb_log_ctl(QB_LOG_BLACKBOX, QB_LOG_CONF_SIZE, IPC_LOGSYS_SIZE); - qb_log_ctl(QB_LOG_BLACKBOX, QB_LOG_CONF_THREADED, QB_FALSE); -- blackbox_enable_res = qb_log_ctl(QB_LOG_BLACKBOX, QB_LOG_CONF_ENABLED, QB_TRUE); -+ -+ /* -+ * Blackbox is disabled at the init and enabled later based -+ * on config (logging.blackbox) value. -+ */ -+ qb_log_ctl(QB_LOG_BLACKBOX, QB_LOG_CONF_ENABLED, QB_FALSE); - - if (logsys_format_set(NULL) == -1) { - return -1; -@@ -397,14 +403,6 @@ int _logsys_system_setup( - } - } - -- if (blackbox_enable_res < 0) { -- LOGSYS_PERROR (-blackbox_enable_res, LOGSYS_LEVEL_WARNING, -- "Unable to initialize log flight recorder. "\ -- "The most common cause of this error is " \ -- "not enough space on /dev/shm. Corosync will continue work, " \ -- "but blackbox will not be available"); -- } -- - pthread_mutex_unlock (&logsys_config_mutex); - - return (0); -@@ -767,10 +765,26 @@ static void _logsys_config_apply_per_subsys(int32_t s) - logsys_loggers[s].dirty = QB_FALSE; - } - -+static void _logsys_config_apply_blackbox(void) { -+ int blackbox_enable_res; -+ -+ blackbox_enable_res = qb_log_ctl(QB_LOG_BLACKBOX, QB_LOG_CONF_ENABLED, logsys_blackbox_enabled); -+ -+ if (blackbox_enable_res < 0) { -+ LOGSYS_PERROR (-blackbox_enable_res, LOGSYS_LEVEL_WARNING, -+ "Unable to initialize log flight recorder. "\ -+ "The most common cause of this error is " \ -+ "not enough space on /dev/shm. Corosync will continue work, " \ -+ "but blackbox will not be available"); -+ } -+} -+ - void logsys_config_apply(void) - { - int32_t s; - -+ _logsys_config_apply_blackbox(); -+ - for (s = 0; s <= LOGSYS_MAX_SUBSYS_COUNT; s++) { - if (strcmp(logsys_loggers[s].subsys, "") == 0) { - continue; -@@ -838,3 +852,13 @@ int logsys_thread_start (void) - - return (0); - } -+ -+void logsys_blackbox_set(int enable) -+{ -+ -+ pthread_mutex_lock (&logsys_config_mutex); -+ -+ logsys_blackbox_enabled = enable; -+ -+ pthread_mutex_unlock (&logsys_config_mutex); -+} -diff --git a/exec/main.c b/exec/main.c -index 7fe24e2..cd587dc 100644 ---- a/exec/main.c -+++ b/exec/main.c -@@ -220,6 +220,7 @@ static void corosync_blackbox_write_to_file (void) - - if ((res = qb_log_blackbox_write_to_file(fname)) < 0) { - LOGSYS_PERROR(-res, LOGSYS_LEVEL_ERROR, "Can't store blackbox file"); -+ return ; - } - snprintf(fdata_fname, sizeof(fdata_fname), "%s/fdata", get_run_dir()); - unlink(fdata_fname); -diff --git a/include/corosync/logsys.h b/include/corosync/logsys.h -index 0b2fbff..ec38d2c 100644 ---- a/include/corosync/logsys.h -+++ b/include/corosync/logsys.h -@@ -256,6 +256,8 @@ extern int _logsys_subsys_create (const char *subsys, const char *filename); - */ - extern int logsys_thread_start (void); - -+extern void logsys_blackbox_set(int enable); -+ - /** - * @brief logsys_subsys_id - */ -diff --git a/man/corosync.conf.5 b/man/corosync.conf.5 -index 0639028..68103d0 100644 ---- a/man/corosync.conf.5 -+++ b/man/corosync.conf.5 -@@ -539,6 +539,12 @@ This specifies that the code function name should be printed. - - The default is off. - -+.TP -+blackbox -+This specifies that blackbox functionality should be enabled. -+ -+The defualt is on. -+ - .PP - The following options are valid both for top level logging directive - and they can be overridden in logger_subsys entries. --- -1.7.1 - diff --git a/SOURCES/bz1536219-2-logging-Close-before-and-open-blackbox-after-fork.patch b/SOURCES/bz1536219-2-logging-Close-before-and-open-blackbox-after-fork.patch deleted file mode 100644 index 9c50816..0000000 --- a/SOURCES/bz1536219-2-logging-Close-before-and-open-blackbox-after-fork.patch +++ /dev/null @@ -1,75 +0,0 @@ -From 995ed0bd814ff3eacf6c09534841e6ce39ab6614 Mon Sep 17 00:00:00 2001 -From: Jan Friesse -Date: Mon, 22 Jan 2018 11:17:52 +0100 -Subject: [PATCH] logging: Close before and open blackbox after fork - -Signed-off-by: Jan Friesse -Reviewed-by: Christine Caulfield -(cherry picked from commit 11fa527ed4960488d275867c28b1bff773e9cf7f) ---- - exec/logsys.c | 16 ++++++++++++++++ - exec/main.c | 6 ++++++ - include/corosync/logsys.h | 5 +++++ - 3 files changed, 27 insertions(+), 0 deletions(-) - -diff --git a/exec/logsys.c b/exec/logsys.c -index a38cc5e..8c9c222 100644 ---- a/exec/logsys.c -+++ b/exec/logsys.c -@@ -862,3 +862,19 @@ void logsys_blackbox_set(int enable) - - pthread_mutex_unlock (&logsys_config_mutex); - } -+ -+/* -+ * To set correct pid to qb blackbox filename after tty dettach (fork) we have to -+ * close (this function) and (if needed) reopen blackbox (logsys_blackbox_postfork function). -+ */ -+void logsys_blackbox_prefork(void) -+{ -+ -+ (void)qb_log_ctl(QB_LOG_BLACKBOX, QB_LOG_CONF_ENABLED, QB_FALSE); -+} -+ -+void logsys_blackbox_postfork(void) -+{ -+ -+ _logsys_config_apply_blackbox(); -+} -diff --git a/exec/main.c b/exec/main.c -index cd587dc..426e56d 100644 ---- a/exec/main.c -+++ b/exec/main.c -@@ -1460,7 +1460,13 @@ int main (int argc, char **argv, char **envp) - * Now we are fully initialized. - */ - if (background) { -+ logsys_blackbox_prefork(); -+ - corosync_tty_detach (); -+ -+ logsys_blackbox_postfork(); -+ -+ log_printf (LOGSYS_LEVEL_DEBUG, "Corosync TTY detached"); - } - - /* -diff --git a/include/corosync/logsys.h b/include/corosync/logsys.h -index ec38d2c..a4aad69 100644 ---- a/include/corosync/logsys.h -+++ b/include/corosync/logsys.h -@@ -258,6 +258,11 @@ extern int logsys_thread_start (void); - - extern void logsys_blackbox_set(int enable); - -+extern void logsys_blackbox_prefork(void); -+ -+extern void logsys_blackbox_postfork(void); -+ -+ - /** - * @brief logsys_subsys_id - */ --- -1.7.1 - diff --git a/SOURCES/bz1560468-1-totemcrypto-Check-length-of-the-packet.patch b/SOURCES/bz1560468-1-totemcrypto-Check-length-of-the-packet.patch deleted file mode 100644 index d574436..0000000 --- a/SOURCES/bz1560468-1-totemcrypto-Check-length-of-the-packet.patch +++ /dev/null @@ -1,48 +0,0 @@ -From 3923de59d71ca6f5affa63a32c6eb688efed6356 Mon Sep 17 00:00:00 2001 -From: Jan Friesse -Date: Fri, 6 Apr 2018 14:43:02 +0200 -Subject: [PATCH] totemcrypto: Check length of the packet - -Packet has to be longer than crypto_config_header and hash_len, -otherwise unallocated memory is passed into calculate_nss_hash function, -what may result in crash. - -Signed-off-by: Jan Friesse -Reviewed-by: Raphael Sanchez Prudencio -Reviewed-by: Christine Caulfield ---- - exec/totemcrypto.c | 11 +++++++++++ - 1 files changed, 11 insertions(+), 0 deletions(-) - -diff --git a/exec/totemcrypto.c b/exec/totemcrypto.c -index 64246c9..88c68d1 100644 ---- a/exec/totemcrypto.c -+++ b/exec/totemcrypto.c -@@ -736,6 +736,11 @@ static int authenticate_nss_2_3 ( - unsigned char tmp_hash[hash_len[instance->crypto_hash_type]]; - int datalen = *buf_len - hash_len[instance->crypto_hash_type]; - -+ if (*buf_len <= hash_len[instance->crypto_hash_type]) { -+ log_printf(instance->log_level_security, "Received message is too short... ignoring"); -+ return -1; -+ } -+ - if (calculate_nss_hash(instance, buf, datalen, tmp_hash) < 0) { - return -1; - } -@@ -845,6 +850,12 @@ int crypto_authenticate_and_decrypt (struct crypto_instance *instance, - { - struct crypto_config_header *cch = (struct crypto_config_header *)buf; - -+ if (*buf_len <= sizeof(struct crypto_config_header)) { -+ log_printf(instance->log_level_security, "Received message is too short... ignoring"); -+ -+ return (-1); -+ } -+ - if (cch->crypto_cipher_type != CRYPTO_CIPHER_TYPE_2_3) { - log_printf(instance->log_level_security, - "Incoming packet has different crypto type. Rejecting"); --- -1.7.1 - diff --git a/SOURCES/bz1634710-1-totemcrypto-Fix-importing-of-the-private-key.patch b/SOURCES/bz1634710-1-totemcrypto-Fix-importing-of-the-private-key.patch deleted file mode 100644 index 4c67e5f..0000000 --- a/SOURCES/bz1634710-1-totemcrypto-Fix-importing-of-the-private-key.patch +++ /dev/null @@ -1,89 +0,0 @@ -From 3f3e6b62719a263cb221c19a06d9a2c570234caa Mon Sep 17 00:00:00 2001 -From: Jan Friesse -Date: Thu, 27 Sep 2018 13:08:48 +0200 -Subject: [PATCH] totemcrypto: Fix importing of the private key - -Import key with length not dividable by wrap key block size was not -possible. - -Wrapping of the key is standard crypto operation which needs data -aligned to cipher block size, otherwise it fails. - -Possible solution is to use a zero filled buffer with size aligned to -required wrap key block size. Private key is copied to the beginning of -the buffer and unwrap operation keeps using only required private key -size. - -Signed-off-by: Jan Friesse -Reviewed-by: Fabio M. Di Nitto -Reviewed-by: Christine Caulfield ---- - exec/totemcrypto.c | 29 +++++++++++++++++++++++++++-- - 1 file changed, 27 insertions(+), 2 deletions(-) - -diff --git a/exec/totemcrypto.c b/exec/totemcrypto.c -index 273c567..55763af 100644 ---- a/exec/totemcrypto.c -+++ b/exec/totemcrypto.c -@@ -247,7 +247,9 @@ static PK11SymKey *import_symmetric_key(struct crypto_instance *instance, enum s - SECItem tmp_sec_item; - SECItem wrapped_key; - int wrapped_key_len; -+ int wrap_key_block_size; - unsigned char wrapped_key_data[MAX_WRAPPED_KEY_LEN]; -+ unsigned char pad_key_data[MAX_WRAPPED_KEY_LEN]; - int case_processed; - - memset(&key_item, 0, sizeof(key_item)); -@@ -256,8 +258,15 @@ static PK11SymKey *import_symmetric_key(struct crypto_instance *instance, enum s - res_key = NULL; - wrap_key_crypt_context = NULL; - -+ if (instance->private_key_len > sizeof(pad_key_data)) { -+ log_printf(instance->log_level_security, "Import symmetric key failed. Private key is too long"); -+ goto exit_res_key; -+ } -+ memset(pad_key_data, 0, sizeof(pad_key_data)); -+ memcpy(pad_key_data, instance->private_key, instance->private_key_len); -+ - key_item.type = siBuffer; -- key_item.data = instance->private_key; -+ key_item.data = pad_key_data; - - case_processed = 0; - switch (key_type) { -@@ -318,6 +327,22 @@ static PK11SymKey *import_symmetric_key(struct crypto_instance *instance, enum s - */ - - /* -+ * Key must be padded to a block size -+ */ -+ wrap_key_block_size = PK11_GetBlockSize(wrap_mechanism, 0); -+ if (wrap_key_block_size < 0) { -+ log_printf(instance->log_level_security, "Unable to get wrap key block size (%d): %s", -+ PR_GetError(), PR_ErrorToString(PR_GetError(), PR_LANGUAGE_I_DEFAULT)); -+ goto exit_res_key; -+ } -+ if (sizeof(pad_key_data) % wrap_key_block_size != 0) { -+ log_printf(instance->log_level_security, "Padded key buffer size (%zu) is not dividable by " -+ "wrap key block size (%u).", sizeof(pad_key_data), (unsigned int)wrap_key_block_size); -+ -+ goto exit_res_key; -+ } -+ -+ /* - * Initialization of IV is not needed because PK11_GetBestWrapMechanism should return ECB mode - */ - memset(&tmp_sec_item, 0, sizeof(tmp_sec_item)); -@@ -332,7 +357,7 @@ static PK11SymKey *import_symmetric_key(struct crypto_instance *instance, enum s - wrapped_key_len = (int)sizeof(wrapped_key_data); - - if (PK11_CipherOp(wrap_key_crypt_context, wrapped_key_data, &wrapped_key_len, -- sizeof(wrapped_key_data), key_item.data, key_item.len) != SECSuccess) { -+ sizeof(wrapped_key_data), key_item.data, sizeof(pad_key_data)) != SECSuccess) { - log_printf(instance->log_level_security, "Unable to encrypt authkey (%d): %s", - PR_GetError(), PR_ErrorToString(PR_GetError(), PR_LANGUAGE_I_DEFAULT)); - goto exit_res_key; --- -1.8.3.1 - diff --git a/SOURCES/bz1656492-1-totem-Increase-ring_id-seq-after-load.patch b/SOURCES/bz1656492-1-totem-Increase-ring_id-seq-after-load.patch new file mode 100644 index 0000000..be46a64 --- /dev/null +++ b/SOURCES/bz1656492-1-totem-Increase-ring_id-seq-after-load.patch @@ -0,0 +1,64 @@ +From 1061804d09565363aba73e369faf310a7d2c4d86 Mon Sep 17 00:00:00 2001 +From: Jan Friesse +Date: Mon, 15 Jul 2019 14:08:39 +0200 +Subject: [PATCH] totem: Increase ring_id seq after load + +This patch handles the situation where the leader +node (the node with lowest node_id) crashes and is started again +before token timeout of the rest of the cluster. +The newly restarted node restores the ringid of the old ring from +stable storage, so it has the same ringid as rest of the nodes, +but ARU is zero. If the node is able to create a singleton membership +before receiving the joinlist from rest of the cluster, +everything works as expected, because the ring id gets increased +correctly. + +But if the node receives a joinlist from another cluster node before +its own joinlist, then it continues as it would had it never left +the cluster. This is not correct, because the new node should always +create a singleton configuration first. + +During the recovery phase, ARUs are compared and because they differ +(the ARU of the old leader node is 0), the other nodes +try to sent all of their previous messages. This is impossible +(even if it was correct), because other nodes have already freed most +of those messages. The implementation uses an assert to limit maximum +number of messages sent during recovery (we could fix this, +but it's not really the point). + +The solution here is to increase the ring_id sequence number by 1 after +loading it from storage. During creation of the commit token it is +always increased by 4, so it will not collide with an existing +sequence. + +Thanks Christine Caulfield for clarify commit +message. + +Signed-off-by: Jan Friesse +Reviewed-by: Christine Caulfield +--- + exec/totemsrp.c | 8 ++++++++ + 1 file changed, 8 insertions(+) + +diff --git a/exec/totemsrp.c b/exec/totemsrp.c +index 0410ed9..c07bd43 100644 +--- a/exec/totemsrp.c ++++ b/exec/totemsrp.c +@@ -5094,6 +5094,14 @@ void main_iface_change_fn ( + if (instance->iface_changes++ == 0) { + instance->memb_ring_id_create_or_load (&instance->my_ring_id, + &instance->my_id.addr[0]); ++ /* ++ * Increase the ring_id sequence number. This doesn't follow specification. ++ * Solves problem with restarted leader node (node with lowest nodeid) before ++ * rest of the cluster forms new membership and guarantees unique ring_id for ++ * new singleton configuration. ++ */ ++ instance->my_ring_id.seq++; ++ + instance->token_ring_id_seq = instance->my_ring_id.seq; + log_printf ( + instance->totemsrp_log_level_debug, +-- +1.8.3.1 + diff --git a/SPECS/corosync.spec b/SPECS/corosync.spec index 55eb1f8..05ee841 100644 --- a/SPECS/corosync.spec +++ b/SPECS/corosync.spec @@ -23,13 +23,13 @@ %global gittarver %{?numcomm:.%{numcomm}}%{?alphatag:-%{alphatag}}%{?dirty:-%{dirty}} %if %{with spausedd} -%global spausedd_version 20190320 +%global spausedd_version 20190807 %endif Name: corosync Summary: The Corosync Cluster Engine and Application Programming Interfaces -Version: 2.4.3 -Release: 6%{?gitver}%{?dist}.1 +Version: 2.4.5 +Release: 4%{?gitver}%{?dist} License: BSD Group: System Environment/Base URL: http://corosync.github.io/corosync/ @@ -42,20 +42,15 @@ Source1: https://github.com/jfriesse/spausedd/releases/download/%{spausedd_versi %endif %endif -Patch0: bz1536219-1-logging-Make-blackbox-configurable.patch -Patch1: bz1536219-2-logging-Close-before-and-open-blackbox-after-fork.patch -Patch2: bz1560468-1-totemcrypto-Check-length-of-the-packet.patch -Patch3: bz1376819-1-configure-add-with-initconfigdir-option.patch -Patch4: bz1376819-2-Use-RuntimeDirectory-instead-of-tmpfiles.d.patch -Patch5: bz1634710-1-totemcrypto-Fix-importing-of-the-private-key.patch -Patch6: bz1376819-3-qnetd-Check-existence-of-NSS-DB-dir-before-fork.patch +Patch0: bz1656492-1-totem-Increase-ring_id-seq-after-load.patch %if 0%{?rhel} -ExclusiveArch: i686 x86_64 s390x ppc64le aarch64 %{arm} +ExclusiveArch: i686 x86_64 s390x ppc64le aarch64 %endif # Runtime bits -Requires: corosynclib = %{version}-%{release} +# The automatic dependency overridden in favor of explicit version lock +Requires: corosynclib%{?_isa} = %{version}-%{release} Requires(pre): /usr/sbin/useradd Requires(post): /sbin/chkconfig Requires(preun): /sbin/chkconfig @@ -64,6 +59,7 @@ Obsoletes: cman, clusterlib, clusterlib-devel # Build bits +BuildRequires: gcc BuildRequires: groff BuildRequires: libqb-devel >= 0.14.2 BuildRequires: nss-devel @@ -114,13 +110,7 @@ BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) %setup -q -n %{name}-%{version}%{?gittarver} %endif -%patch0 -p1 -b .bz1536219-1 -%patch1 -p1 -b .bz1536219-2 -%patch2 -p1 -b .bz1560468-1 -%patch3 -p1 -b .bz1376819-1 -%patch4 -p1 -b .bz1376819-2 -%patch5 -p1 -b .bz1634710-1 -%patch6 -p1 -b .bz1376819-3 +%patch0 -p1 -b .bz1656492-1 %build %if %{with runautogen} @@ -392,7 +382,7 @@ This package contains corosync libraries. %package -n corosynclib-devel Summary: The Corosync Cluster Engine Development Kit Group: Development/Libraries -Requires: corosynclib = %{version}-%{release} +Requires: corosynclib%{?_isa} = %{version}-%{release} Requires: pkgconfig Provides: corosync-devel = %{version} Obsoletes: corosync-devel < 0.92-7 @@ -446,7 +436,8 @@ The Corosync Cluster Engine APIs. Summary: The Corosync Cluster Engine Qdevice Group: System Environment/Base Requires: %{name} = %{version}-%{release} -Requires: corosynclib = %{version}-%{release} +# The automatic dependency overridden in favor of explicit version lock +Requires: corosynclib%{?_isa} = %{version}-%{release} Requires: nss-tools %if %{with systemd} @@ -628,12 +619,31 @@ fi %endif %changelog -* Fri Aug 16 2019 Jan Friesse 2.4.3-6.1 -- Resolves: rhbz#1740181 +* Wed Aug 07 2019 Jan Friesse - 2.4.5-4 +- Related: rhbz#1737884 + +- Enhance spausedd makefile + +* Tue Aug 06 2019 Jan Friesse - 2.4.5-3 +- Resolves: rhbz#1737884 +- Resolves: rhbz#1737887 - Do not set exec permission for service file - Fix CFLAGS definition +* Tue Jul 30 2019 Jan Friesse 2.4.5-2 +- Resolves: rhbz#1656492 + +- totem: Increase ring_id seq after load (rhbz#1656492) +- merge upstream commit 1061804d09565363aba73e369faf310a7d2c4d86 (rhbz#1656492) + +* Tue Jul 30 2019 Jan Friesse 2.4.5-1 +- Resolves: rhbz#1732039 +- Resolves: rhbz#1153818 +- Resolves: rhbz#1647120 + +- Rebase to Corosync 2.4.5 + * Thu Mar 21 2019 Jan Friesse 2.4.3-6 - Resolves: rhbz#1542703