move to submodule build

allowing us to drop the tarball tracking and the patches-of-patches
thing, which is just plain annoying and costs to much time and nerves
when touching anything..

diffoscope tested previous and current .deb, only real change is the
exclusion of the changelog from Debian, but as that was ordered after
ours anyway it shouldn't be to big of an issue

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Thomas Lamprecht 2019-10-03 15:54:00 +02:00
parent fa960e0c13
commit 8dcb3076b4
70 changed files with 1710 additions and 6819 deletions

3
.gitmodules vendored Normal file
View File

@ -0,0 +1,3 @@
[submodule "upstream"]
path = upstream
url = ../mirror_corosync

View File

@ -1,11 +1,13 @@
include /usr/share/dpkg/pkg-info.mk
include /usr/share/dpkg/architecture.mk
CSVERSION=3.0.2
PACKAGE=corosync
CSVERSION=${DEB_VERSION_UPSTREAM}
CSRELEASE=pve2
# note: 3.0.2 cherry-picked as patches!
DEBRELEASE=INVALID
CSDIR=corosync-${CSVERSION}
CSSRC=corosync_${CSVERSION}.orig.tar.gz
BUILDDIR=${PACKAGE}-${CSVERSION}
CSSRC=upstream
ARCH:=$(shell dpkg-architecture -qDEB_BUILD_ARCH)
GITVERSION:=$(shell git rev-parse HEAD)
@ -48,44 +50,35 @@ DSC=corosync-pve_${CSVERSION}-${CSRELEASE}.dsc
all: ${DEBS}
echo ${DEBS}
${CSDIR}: ${CSSRC} patches changelog.Debian
${BUILDDIR}: submodule debian/changelog
rm -rf $@ $@.tmp
mkdir $@.tmp
tar -C $@.tmp --strip-components=1 -xf ${CSSRC}
mv $@.tmp/debian/changelog $@.tmp/debian/changelog.org
cat changelog.Debian $@.tmp/debian/changelog.org > $@.tmp/debian/changelog
cd $@.tmp; ln -s ../patches patches
cd $@.tmp; quilt push -a
cd $@.tmp; rm -rf .pc ./patches
cp -a ${CSSRC} $@.tmp
cp -a debian $@.tmp
mv $@.tmp $@
.PHONY: deb
deb: ${DEBS}
${OTHER_DEBS} ${DBG_DEBS}: ${MAIN_DEB}
${MAIN_DEB}: ${CSDIR}
cd ${CSDIR}; dpkg-buildpackage -b -us -uc
${MAIN_DEB}: ${BUILDDIR}
cd ${BUILDDIR}; dpkg-buildpackage -b -us -uc
.PHONY: dsc
dsc: ${DSC}
${DSC}: ${CSDIR}
cd ${CSDIR}; dpkg-buildpackage -S -us -uc -d -nc
${DSC}: ${BUILDDIR}
cd ${BUILDDIR}; dpkg-buildpackage -S -us -uc -d -nc
.PHONY: download
download:
rm -rf ${CSSRC} ${CSSRC}.tmp ${CSDIR}
git clone https://salsa.debian.org/ha-team/corosync.git -b debian/${CSVERSION}-${DEBRELEASE} ${CSDIR}
tar czf ${CSSRC}.tmp ${CSDIR}
mv ${CSSRC}.tmp ${CSSRC}
.PHONY: submodule
submodule:
test -f "${CSSRC}/INSTALL" || git submodule update --init ${CSSRC}
.PHONY: upload
upload: ${DEBS}
tar cf - ${DEBS} | ssh -X repoman@repo.proxmox.com -- upload --product pve --dist buster --arch ${DEB_BUILD_ARCH}
distclean: clean
.PHONY: clean
distclean: clean
clean:
rm -rf *.deb *.changes *.dsc *.buildinfo ${CSDIR} *.debian.tar.xz
rm -rf *.deb *.changes *.dsc *.buildinfo ${BUILDDIR}
find . -name '*~' -exec rm {} ';'
.PHONY: dinstall

Binary file not shown.

19
debian/check_header_deps vendored Executable file
View File

@ -0,0 +1,19 @@
#!/bin/sh -e
cd debian
pkgs=$(grep-dctrl -sPackage -n -FSection libdevel control)
for p in $pkgs; do
includes="$includes -I $p/usr/include"
done
for pkg in $pkgs; do
{
printf 'header:Depends='
for header in $(find "$pkg" -name "*.h"); do
gcc -MM -MT '' -E $includes $header
done | sed "s|^:||;s|^ *||;\|^$pkg/|d;s|/.*| (= \${binary:Version}),|" | sort -u | tr '\n' ' '
printf '\n'
} >>"$pkg.substvars"
done

1
debian/compat vendored Normal file
View File

@ -0,0 +1 @@
12

259
debian/control vendored Normal file
View File

@ -0,0 +1,259 @@
Source: corosync
Section: admin
Priority: optional
Maintainer: Debian HA Maintainers <debian-ha-maintainers@lists.alioth.debian.org>
Uploaders:
Adrian Vondendriesch <adrian.vondendriesch@credativ.de>,
Ferenc Wágner <wferi@debian.org>,
Standards-Version: 4.3.0
Build-Depends:
debhelper (>= 12~),
dctrl-tools,
groff,
libdbus-1-dev,
libknet-dev,
# protect backports from silent log loss (#898266):
libqb-dev (>= 1.0.3),
libsnmp-dev,
# libstatgrab is Linux-only until #823899 and #823900 gets fixed:
libstatgrab-dev [linux-any],
libsystemd-dev [linux-any],
libxml2-dev,
pkg-config,
zlib1g-dev
Build-Depends-Indep:
doxygen,
graphviz,
Homepage: https://corosync.github.io/corosync/
Vcs-Git: https://salsa.debian.org/ha-team/corosync.git
Vcs-Browser: https://salsa.debian.org/ha-team/corosync
X-Common-Description: The Corosync Cluster Engine is a Group Communication
System with additional features for implementing high availability within
applications. The project provides four C Application Programming Interface
features:
.
* A closed process group communication model with virtual synchrony
guarantees for creating replicated state machines.
* A simple availability manager that restarts the application process
when it has failed.
* A configuration and statistics in-memory database that provide the
ability to set, retrieve, and receive change notifications of
information.
* A quorum system that notifies applications when quorum is achieved
or lost.
Package: corosync
Architecture: any
Pre-Depends:
${misc:Pre-Depends},
Depends: ${shlibs:Depends},
${misc:Depends},
lsb-base (>= 3.0-6),
adduser,
xsltproc
Description: cluster engine daemon and utilities
${S:X-Common-Description}
.
This package contains the Corosync daemon and some administration tools.
Package: corosync-notifyd
Architecture: any
Pre-Depends:
${misc:Pre-Depends},
Depends: ${shlibs:Depends},
${misc:Depends},
corosync,
lsb-base (>= 3.0-6)
Recommends: dbus
Description: cluster engine notification daemon
${S:X-Common-Description}
.
This package contains the DBus/SNMP notification daemon for Corosync events.
Package: corosync-doc
Section: doc
Architecture: all
Multi-Arch: foreign
Depends: ${misc:Depends}
Recommends: w3m | www-browser
Description: cluster engine HTML documentation
${S:X-Common-Description}
.
This package contains the Corosync HTML manuals and the API documentation
generated by Doxygen.
Package: libcfg7
Section: libs
Architecture: any
Multi-Arch: same
Pre-Depends: ${misc:Pre-Depends}
Depends: ${shlibs:Depends},
${misc:Depends}
Description: cluster engine CFG library
${S:X-Common-Description}
.
This package contains the CFG library.
Package: libcmap4
Section: libs
Architecture: any
Multi-Arch: same
Pre-Depends: ${misc:Pre-Depends}
Depends: ${shlibs:Depends},
${misc:Depends}
Description: cluster engine CMAP library
${S:X-Common-Description}
.
This package contains the Configuration Map library.
Package: libcorosync-common4
Section: libs
Architecture: any
Multi-Arch: same
Pre-Depends: ${misc:Pre-Depends}
Depends: ${shlibs:Depends},
${misc:Depends}
Description: cluster engine common library
${S:X-Common-Description}
.
This package contains the Corosync common library.
Package: libcpg4
Section: libs
Architecture: any
Multi-Arch: same
Pre-Depends: ${misc:Pre-Depends}
Depends: ${shlibs:Depends},
${misc:Depends}
Description: cluster engine CPG library
${S:X-Common-Description}
.
This package contains the Closed Process Group library.
Package: libquorum5
Section: libs
Architecture: any
Multi-Arch: same
Pre-Depends: ${misc:Pre-Depends}
Depends: ${shlibs:Depends},
${misc:Depends}
Description: cluster engine Quorum library
${S:X-Common-Description}
.
This package contains the Quorum library.
Package: libsam4
Section: libs
Architecture: any
Multi-Arch: same
Pre-Depends: ${misc:Pre-Depends}
Depends: ${shlibs:Depends},
${misc:Depends}
Description: cluster engine SAM library
${S:X-Common-Description}
.
This package contains the Simple Availability Manager library.
Package: libvotequorum8
Section: libs
Architecture: any
Multi-Arch: same
Pre-Depends: ${misc:Pre-Depends}
Depends: ${shlibs:Depends},
${misc:Depends}
Description: cluster engine Votequorum library
${S:X-Common-Description}
.
This package contains the Votequorum library.
Package: libcfg-dev
Section: libdevel
Architecture: any
Multi-Arch: same
Depends: ${misc:Depends},
${header:Depends},
libcfg7 (= ${binary:Version})
Description: cluster engine CFG library development
${S:X-Common-Description}
.
This package contains the headers and other necessary files to build
applications or libraries that use the CFG library.
Package: libcmap-dev
Section: libdevel
Architecture: any
Multi-Arch: same
Depends: ${misc:Depends},
${header:Depends},
libcmap4 (= ${binary:Version})
Description: cluster engine CMAP library development
${S:X-Common-Description}
.
This package contains the headers and other necessary files to build
applications or libraries that use the Configuration Map library.
Package: libcorosync-common-dev
Section: libdevel
Architecture: any
Multi-Arch: same
Depends: ${misc:Depends},
${header:Depends},
libqb-dev,
libcorosync-common4 (= ${binary:Version})
Description: cluster engine common development
${S:X-Common-Description}
.
This package contains the headers and other necessary files to build
applications or libraries that use the Corosync libraries.
Package: libcpg-dev
Section: libdevel
Architecture: any
Multi-Arch: same
Depends: ${misc:Depends},
${header:Depends},
libcpg4 (= ${binary:Version})
Description: cluster engine CPG library development
${S:X-Common-Description}
.
This package contains the headers and other necessary files to build
applications or libraries that use the Closed Process Group library.
Package: libquorum-dev
Section: libdevel
Architecture: any
Multi-Arch: same
Depends: ${misc:Depends},
${header:Depends},
libquorum5 (= ${binary:Version})
Description: cluster engine Quorum library development
${S:X-Common-Description}
.
This package contains the headers and other necessary files to build
applications or libraries that use the Quorum library.
Package: libsam-dev
Section: libdevel
Architecture: any
Multi-Arch: same
Depends: ${misc:Depends},
${header:Depends},
libsam4 (= ${binary:Version})
Description: cluster engine SAM library development
${S:X-Common-Description}
.
This package contains the headers and other necessary files to build
applications or libraries that use the Simple Availability Manager library.
Package: libvotequorum-dev
Section: libdevel
Architecture: any
Multi-Arch: same
Depends: ${misc:Depends},
${header:Depends},
libvotequorum8 (= ${binary:Version})
Description: cluster engine Votequorum library development
${S:X-Common-Description}
.
This package contains the headers and other necessary files to build
applications or libraries that use the Votequorum library.

76
debian/copyright vendored Normal file
View File

@ -0,0 +1,76 @@
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: corosync
Source: http://build.clusterlabs.org/corosync/releases/
Files: *
Comment: Based on the distributed LICENSE file
Copyright: 2002-2004 MontaVista Software, Inc.
2005-2018 Red Hat, Inc.
License: BSD-3-clause
Files: build-aux/git-version-gen
build-aux/gitlog-to-changelog
Comment: Based on the distributed LICENSE file
Copyright: 2002-2004 MontaVista Software, Inc.
2005-2013 Red Hat, Inc.
License: GPL-3+
Files: debian/*
Copyright: 2006-2009 Fabio M. Di Nitto <fabbione@ubuntu.com>
2007 Bastian Blank <waldi@debian.org>
2007 Soren Hansen <soren@ubuntu.com>
2007-2008 Frederik Schüler <fs@debian.org>
2009 Ante Karamatić <ivoks@ubuntu.com>
2009-2012 Guido Günther <agx@sigxcpu.org>
2011 Andres Rodriguez <andreserl@ubuntu.com>
2011-2014 Martin Loschwitz <madkiss@debian.org>
2014 Wookey <wookey@debian.org>
2015 Richard B Winters <rik@mmogp.com>
2015-2018 Ferenc Wágner <wferi@debian.org>
License: BSD-3-clause
License: BSD-3-clause
All rights reserved.
.
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.
License: GPL-3+
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
.
On Debian systems, the complete text of the GNU General
Public License version 3 can be found in "/usr/share/common-licenses/GPL-3".

7
debian/corosync-doc.doc-base.api vendored Normal file
View File

@ -0,0 +1,7 @@
Document: corosync-api
Title: Corosync Library API documentation
Section: Programming/C
Format: HTML
Index: /usr/share/doc/corosync/api/html/index.html
Files: /usr/share/doc/corosync/api/html/*

7
debian/corosync-doc.doc-base.html vendored Normal file
View File

@ -0,0 +1,7 @@
Document: corosync-html
Title: Corosync manual pages
Section: Programming/C
Format: HTML
Index: /usr/share/doc/corosync/html/index.html
Files: /usr/share/doc/corosync/html/*

2
debian/corosync-doc.install vendored Normal file
View File

@ -0,0 +1,2 @@
doc/api/html usr/share/doc/corosync/api
usr/share/doc/corosync/html

2
debian/corosync-notifyd.default vendored Normal file
View File

@ -0,0 +1,2 @@
# Send DBUS signals on all events (see corosync-notifyd(8) for options)
OPTIONS="-d"

119
debian/corosync-notifyd.init vendored Normal file
View File

@ -0,0 +1,119 @@
#! /bin/sh
#
### BEGIN INIT INFO
# Provides: corosync-notifyd
# Required-Start: $network $remote_fs $syslog corosync
# Required-Stop: $network $remote_fs $syslog corosync
# Should-Start: dbus
# Should-Stop: dbus
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: corosync notifying daemon
# Description: Manages the notification daemon of the Corosync Cluster Engine.
### END INIT INFO
# Author: Fabio M. Di Nitto <fabbione@ubuntu.com>
# PATH should only include /usr/* if it runs after the mountnfs.sh script
PATH=/usr/sbin:/usr/bin:/sbin:/bin
DESC="corosync notifying daemon"
NAME=corosync-notifyd
DAEMON=/usr/sbin/$NAME
PIDFILE=/var/run/$NAME.pid
SCRIPTNAME=/etc/init.d/$NAME
PIDFILE=/var/run/corosync.pid
RARUNDIR=/var/run/resource-agents
# Exit if the package is not installed
[ -x "$DAEMON" ] || exit 0
# Read configuration variable file if it is present
[ -r /etc/default/corosync-notifyd ] && . /etc/default/corosync-notifyd
# Define LSB log_* functions.
# Depend on lsb-base (>= 3.0-6) to ensure that this file is present.
. /lib/lsb/init-functions
#
# Function that starts the daemon/service
#
do_start()
{
# Return
# 0 if daemon has been started
# 1 if daemon was already running
# 2 if daemon could not be started
start-stop-daemon --start --quiet --exec $DAEMON --test > /dev/null \
|| return 1
start-stop-daemon --start --quiet --exec $DAEMON -- $OPTIONS \
|| return 2
# Add code here, if necessary, that waits for the process to be ready
# to handle requests from services started subsequently which depend
# on this one. As a last resort, sleep for some time.
pidof $DAEMON > $PIDFILE
}
#
# Function that stops the daemon/service
#
do_stop()
{
# Return
# 0 if daemon has been stopped
# 1 if daemon was already stopped
# 2 if daemon could not be stopped
# other if a failure occurred
start-stop-daemon --stop --quiet --retry forever/QUIT/1 --pidfile $PIDFILE
RETVAL="$?"
[ "$RETVAL" = 2 ] && return 2
# Many daemons don't delete their pidfiles when they exit.
rm -f $PIDFILE
return "$RETVAL"
}
case "$1" in
start)
log_daemon_msg "Starting $DESC" "$NAME"
do_start
case "$?" in
0|1) log_end_msg 0 ;;
2) log_end_msg 1 ;;
esac
;;
stop)
log_daemon_msg "Stopping $DESC" "$NAME"
do_stop
case "$?" in
0|1) log_end_msg 0 ;;
2) log_end_msg 1 ;;
esac
;;
restart|force-reload)
log_daemon_msg "Restarting $DESC" "$NAME"
do_stop
case "$?" in
0|1)
do_start
case "$?" in
0) log_end_msg 0 ;;
1) log_end_msg 1 ;; # Old process is still running
*) log_end_msg 1 ;; # Failed to start
esac
;;
*)
# Failed to stop
log_end_msg 1
;;
esac
;;
status|monitor)
status_of_proc -p $PIDFILE $DAEMON $NAME && exit 0 || exit $?
;;
*)
#echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload}" >&2
echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2
exit 3
;;
esac
:

5
debian/corosync-notifyd.install vendored Normal file
View File

@ -0,0 +1,5 @@
etc/dbus-1/system.d/corosync-signals.conf
lib/systemd/system/corosync-notifyd.service
usr/sbin/corosync-notifyd
usr/share/man/man8/corosync-notifyd.8
usr/share/snmp/mibs/COROSYNC-MIB.txt

1
debian/corosync-notifyd.maintscript vendored Normal file
View File

@ -0,0 +1 @@
rm_conffile /etc/init/corosync-notifyd.conf 2.4.3-1~

2
debian/corosync.default vendored Normal file
View File

@ -0,0 +1,2 @@
# Command line options
#OPTIONS=""

2
debian/corosync.dirs vendored Normal file
View File

@ -0,0 +1,2 @@
# the log dir is used in debian/corosync.postinst
var/log/corosync

29
debian/corosync.install vendored Normal file
View File

@ -0,0 +1,29 @@
etc/logrotate.d/corosync
lib/systemd/system/corosync.service
usr/bin/corosync-blackbox
usr/bin/corosync-xmlproc
usr/sbin/corosync
usr/sbin/corosync-cfgtool
usr/sbin/corosync-keygen
usr/sbin/corosync-cpgtool
usr/sbin/corosync-quorumtool
usr/sbin/corosync-cmapctl
usr/share/man/man5/corosync*.5
usr/share/man/man5/votequorum.5
usr/share/man/man8/corosync-blackbox.8
usr/share/man/man8/corosync-cfgtool.8
usr/share/man/man8/corosync-cmapctl.8
usr/share/man/man8/corosync-cpgtool.8
usr/share/man/man8/corosync-keygen.8
usr/share/man/man8/corosync-quorumtool.8
usr/share/man/man8/corosync-xmlproc.8
usr/share/man/man8/corosync.8
usr/share/man/man7/corosync_overview.7
usr/share/man/man8/cmap_keys.8
usr/share/doc/corosync/README.recovery
usr/share/doc/corosync/AUTHORS
usr/share/doc/corosync/INSTALL
etc/corosync/corosync.*example* usr/share/doc/corosync/examples
etc/corosync/uidgid.d
usr/share/corosync/xml2conf.xsl
var/lib/corosync

2
debian/corosync.lintian-overrides vendored Normal file
View File

@ -0,0 +1,2 @@
# This file contains configuration instructions as well
package-contains-upstream-installation-documentation usr/share/doc/corosync/INSTALL.gz

1
debian/corosync.maintscript vendored Normal file
View File

@ -0,0 +1 @@
rm_conffile /etc/init/corosync.conf 2.4.3-1~

11
debian/corosync.postinst vendored Normal file
View File

@ -0,0 +1,11 @@
#!/bin/sh
set -e
if [ "$1" = "configure" ]; then
echo 'This file is here to keep the log dir around after package removal
until #588515 is fixed.' >/var/log/corosync/.empty
# really was empty before 2.3.5-1
fi
#DEBHELPER#

10
debian/corosync.postrm vendored Normal file
View File

@ -0,0 +1,10 @@
#!/bin/sh
set -e
if [ "$1" = purge ]; then
rm -rf /var/lib/corosync
rm -rf /var/log/corosync
fi
#DEBHELPER#

14
debian/gbp.conf vendored Normal file
View File

@ -0,0 +1,14 @@
[DEFAULT]
debian-branch = debian/master
upstream-branch = upstream/latest
[import-orig]
pristine-tar = True
[pq]
patch-numbers = False
[dch]
full = True
multimaint-merge = True
id-length = 7

3
debian/libcfg-dev.install vendored Normal file
View File

@ -0,0 +1,3 @@
usr/include/corosync/cfg.h
usr/lib/*/libcfg.so
usr/lib/*/pkgconfig/libcfg.pc

1
debian/libcfg7.install vendored Normal file
View File

@ -0,0 +1 @@
usr/lib/*/libcfg.so.*

17
debian/libcfg7.symbols vendored Normal file
View File

@ -0,0 +1,17 @@
libcfg.so.7 libcfg7 #MINVER#
* Build-Depends-Package: libcfg-dev
COROSYNC_CFG_0.82@COROSYNC_CFG_0.82 2.99.5
(arch=!ppc64el !hppa !hurd-i386 !powerpc !powerpcspe !ppc64)__start___verbose@Base 2.99.5
(arch=!ppc64el !hppa !hurd-i386 !powerpc !powerpcspe !ppc64)__stop___verbose@Base 2.99.5
corosync_cfg_dispatch@COROSYNC_CFG_0.82 2.99.5
corosync_cfg_fd_get@COROSYNC_CFG_0.82 2.99.5
corosync_cfg_finalize@COROSYNC_CFG_0.82 2.99.5
corosync_cfg_get_node_addrs@Base 2.99.5
corosync_cfg_initialize@COROSYNC_CFG_0.82 2.99.5
corosync_cfg_kill_node@Base 2.99.5
corosync_cfg_local_get@Base 2.99.5
corosync_cfg_reload_config@Base 2.99.5
corosync_cfg_reopen_log_files@Base 2.99.5
corosync_cfg_replyto_shutdown@Base 2.99.5
corosync_cfg_ring_status_get@COROSYNC_CFG_0.82 2.99.5
corosync_cfg_try_shutdown@Base 2.99.5

5
debian/libcmap-dev.install vendored Normal file
View File

@ -0,0 +1,5 @@
usr/include/corosync/cmap.h
usr/lib/*/libcmap.so
usr/lib/*/pkgconfig/libcmap.pc
usr/share/man/man3/cmap_*.3
usr/share/man/man3/cmap_overview.3

2
debian/libcmap4.install vendored Normal file
View File

@ -0,0 +1,2 @@
usr/lib/*/libcmap.so.4
usr/lib/*/libcmap.so.4.1.0

44
debian/libcmap4.symbols vendored Normal file
View File

@ -0,0 +1,44 @@
libcmap.so.4 libcmap4 #MINVER#
* Build-Depends-Package: libcmap-dev
COROSYNC_CMAP_1.0@COROSYNC_CMAP_1.0 1.99.9
(arch=!ppc64el !hppa !hurd-i386 !powerpc !powerpcspe !ppc64)__start___verbose@Base 2.4.3
(arch=!ppc64el !hppa !hurd-i386 !powerpc !powerpcspe !ppc64)__stop___verbose@Base 2.4.3
cmap_context_get@Base 1.99.9
cmap_context_set@Base 1.99.9
cmap_dec@Base 1.99.9
cmap_delete@Base 1.99.9
cmap_dispatch@Base 1.99.9
cmap_fd_get@Base 1.99.9
cmap_finalize@Base 1.99.9
cmap_get@Base 1.99.9
cmap_get_double@Base 1.99.9
cmap_get_float@Base 1.99.9
cmap_get_int16@Base 1.99.9
cmap_get_int32@Base 1.99.9
cmap_get_int64@Base 1.99.9
cmap_get_int8@Base 1.99.9
cmap_get_string@Base 1.99.9
cmap_get_uint16@Base 1.99.9
cmap_get_uint32@Base 1.99.9
cmap_get_uint64@Base 1.99.9
cmap_get_uint8@Base 1.99.9
cmap_inc@Base 1.99.9
cmap_initialize@COROSYNC_CMAP_1.0 1.99.9
cmap_initialize_map@Base 2.99.3
cmap_iter_finalize@Base 1.99.9
cmap_iter_init@Base 1.99.9
cmap_iter_next@Base 1.99.9
cmap_set@Base 1.99.9
cmap_set_double@Base 1.99.9
cmap_set_float@Base 1.99.9
cmap_set_int16@Base 1.99.9
cmap_set_int32@Base 1.99.9
cmap_set_int64@Base 1.99.9
cmap_set_int8@Base 1.99.9
cmap_set_string@Base 1.99.9
cmap_set_uint16@Base 1.99.9
cmap_set_uint32@Base 1.99.9
cmap_set_uint64@Base 1.99.9
cmap_set_uint8@Base 1.99.9
cmap_track_add@Base 1.99.9
cmap_track_delete@Base 1.99.9

6
debian/libcorosync-common-dev.install vendored Normal file
View File

@ -0,0 +1,6 @@
usr/lib/*/libcorosync_common.so
usr/lib/*/pkgconfig/libcorosync_common.pc
usr/include/corosync/corodefs.h
usr/include/corosync/corotypes.h
usr/include/corosync/hdb.h
usr/lib/*/pkgconfig/corosync.pc

2
debian/libcorosync-common4.install vendored Normal file
View File

@ -0,0 +1,2 @@
usr/lib/*/libcorosync_common.so.4
usr/lib/*/libcorosync_common.so.4.0.0

View File

@ -0,0 +1,2 @@
# This tiny library does not even need libc
shared-lib-without-dependency-information usr/lib/*/libcorosync_common.so.4.0.0

5
debian/libcorosync-common4.symbols vendored Normal file
View File

@ -0,0 +1,5 @@
libcorosync_common.so.4 libcorosync-common4 #MINVER#
* Build-Depends-Package: libcorosync-common-dev
cs_strerror@Base 1.99.9
hdb_error_to_cs@Base 1.99.9
qb_to_cs_error@Base 1.99.9

5
debian/libcpg-dev.install vendored Normal file
View File

@ -0,0 +1,5 @@
usr/include/corosync/cpg.h
usr/lib/*/libcpg.so
usr/lib/*/pkgconfig/libcpg.pc
usr/share/man/man3/cpg_*.3
usr/share/man/man3/cpg_overview.3

2
debian/libcpg4.install vendored Normal file
View File

@ -0,0 +1,2 @@
usr/lib/*/libcpg.so.4
usr/lib/*/libcpg.so.4.1.0

25
debian/libcpg4.symbols vendored Normal file
View File

@ -0,0 +1,25 @@
libcpg.so.4 libcpg4 #MINVER#
* Build-Depends-Package: libcpg-dev
COROSYNC_CPG_1.0@COROSYNC_CPG_1.0 1.0.0
(arch=!ppc64el !hppa !hurd-i386 !powerpc !powerpcspe !ppc64)__start___verbose@Base 2.4.3
(arch=!ppc64el !hppa !hurd-i386 !powerpc !powerpcspe !ppc64)__stop___verbose@Base 2.4.3
cpg_context_get@COROSYNC_CPG_1.0 1.0.0
cpg_context_set@COROSYNC_CPG_1.0 1.0.0
cpg_dispatch@COROSYNC_CPG_1.0 1.0.0
cpg_fd_get@COROSYNC_CPG_1.0 1.0.0
cpg_finalize@COROSYNC_CPG_1.0 1.0.0
cpg_flow_control_state_get@Base 1.0.0
cpg_initialize@COROSYNC_CPG_1.0 1.0.0
cpg_iteration_finalize@Base 1.1.0
cpg_iteration_initialize@Base 1.1.0
cpg_iteration_next@Base 1.1.0
cpg_join@COROSYNC_CPG_1.0 1.0.0
cpg_leave@COROSYNC_CPG_1.0 1.0.0
cpg_local_get@Base 1.0.0
cpg_max_atomic_msgsize_get@Base 2.3.5
cpg_mcast_joined@COROSYNC_CPG_1.0 1.0.0
cpg_membership_get@COROSYNC_CPG_1.0 1.0.0
cpg_model_initialize@Base 1.3.0
cpg_zcb_alloc@COROSYNC_CPG_1.0 1.0.0
cpg_zcb_free@COROSYNC_CPG_1.0 1.0.0
cpg_zcb_mcast_joined@Base 1.0.0

5
debian/libquorum-dev.install vendored Normal file
View File

@ -0,0 +1,5 @@
usr/lib/*/libquorum.so
usr/lib/*/pkgconfig/libquorum.pc
usr/include/corosync/quorum.h
usr/share/man/man3/quorum_*.3
usr/share/man/man3/quorum_overview.3

2
debian/libquorum5.install vendored Normal file
View File

@ -0,0 +1,2 @@
usr/lib/*/libquorum.so.5
usr/lib/*/libquorum.so.5.0.0

14
debian/libquorum5.symbols vendored Normal file
View File

@ -0,0 +1,14 @@
libquorum.so.5 libquorum5 #MINVER#
* Build-Depends-Package: libquorum-dev
COROSYNC_QUORUM_1.0@COROSYNC_QUORUM_1.0 1.99.9
(arch=!ppc64el !hppa !hurd-i386 !powerpc !powerpcspe !ppc64)__start___verbose@Base 2.4.3
(arch=!ppc64el !hppa !hurd-i386 !powerpc !powerpcspe !ppc64)__stop___verbose@Base 2.4.3
quorum_context_get@Base 1.99.9
quorum_context_set@Base 1.99.9
quorum_dispatch@COROSYNC_QUORUM_1.0 1.99.9
quorum_fd_get@Base 1.99.9
quorum_finalize@COROSYNC_QUORUM_1.0 1.99.9
quorum_getquorate@COROSYNC_QUORUM_1.0 1.99.9
quorum_initialize@COROSYNC_QUORUM_1.0 1.99.9
quorum_trackstart@Base 1.99.9
quorum_trackstop@Base 1.99.9

5
debian/libsam-dev.install vendored Normal file
View File

@ -0,0 +1,5 @@
usr/include/corosync/sam.h
usr/lib/*/libsam.so
usr/lib/*/pkgconfig/libsam.pc
usr/share/man/man3/sam_*.3
usr/share/man/man3/sam_overview.3

2
debian/libsam4.install vendored Normal file
View File

@ -0,0 +1,2 @@
usr/lib/*/libsam.so.4
usr/lib/*/libsam.so.4.4.0

17
debian/libsam4.symbols vendored Normal file
View File

@ -0,0 +1,17 @@
libsam.so.4 libsam4 #MINVER#
* Build-Depends-Package: libsam-dev
COROSYNC_SAM_1.0@COROSYNC_SAM_1.0 1.2.0
(arch=!ppc64el !hppa !hurd-i386 !powerpc !powerpcspe !ppc64)__start___verbose@Base 2.4.3
(arch=!ppc64el !hppa !hurd-i386 !powerpc !powerpcspe !ppc64)__stop___verbose@Base 2.4.3
sam_data_getsize@Base 1.99.9
sam_data_restore@Base 1.99.9
sam_data_store@Base 1.99.9
sam_finalize@COROSYNC_SAM_1.0 1.2.0
sam_hc_callback_register@COROSYNC_SAM_1.0 1.2.0
sam_hc_send@COROSYNC_SAM_1.0 1.2.0
sam_initialize@Base 1.2.0
sam_mark_failed@Base 1.99.9
sam_register@COROSYNC_SAM_1.0 1.2.0
sam_start@COROSYNC_SAM_1.0 1.2.0
sam_stop@COROSYNC_SAM_1.0 1.2.0
sam_warn_signal_set@Base 1.2.7

5
debian/libvotequorum-dev.install vendored Normal file
View File

@ -0,0 +1,5 @@
usr/include/corosync/votequorum.h
usr/lib/*/libvotequorum.so
usr/lib/*/pkgconfig/libvotequorum.pc
usr/share/man/man3/votequorum_*.3
usr/share/man/man3/votequorum_overview.3

1
debian/libvotequorum8.install vendored Normal file
View File

@ -0,0 +1 @@
usr/lib/*/libvotequorum.so.*

21
debian/libvotequorum8.symbols vendored Normal file
View File

@ -0,0 +1,21 @@
libvotequorum.so.8 libvotequorum8 #MINVER#
* Build-Depends-Package: libvotequorum-dev
COROSYNC_VOTEQUORUM_1.0@COROSYNC_VOTEQUORUM_1.0 2.4.2
(arch=!ppc64el !hppa !hurd-i386 !powerpc !powerpcspe !ppc64)__start___verbose@Base 2.4.3
(arch=!ppc64el !hppa !hurd-i386 !powerpc !powerpcspe !ppc64)__stop___verbose@Base 2.4.3
votequorum_context_get@COROSYNC_VOTEQUORUM_1.0 2.4.2
votequorum_context_set@COROSYNC_VOTEQUORUM_1.0 2.4.2
votequorum_dispatch@Base 2.4.2
votequorum_fd_get@Base 2.4.2
votequorum_finalize@COROSYNC_VOTEQUORUM_1.0 2.4.2
votequorum_getinfo@COROSYNC_VOTEQUORUM_1.0 2.4.2
votequorum_initialize@COROSYNC_VOTEQUORUM_1.0 2.4.2
votequorum_qdevice_master_wins@Base 2.4.2
votequorum_qdevice_poll@COROSYNC_VOTEQUORUM_1.0 2.4.2
votequorum_qdevice_register@COROSYNC_VOTEQUORUM_1.0 2.4.2
votequorum_qdevice_unregister@COROSYNC_VOTEQUORUM_1.0 2.4.2
votequorum_qdevice_update@Base 2.4.2
votequorum_setexpected@COROSYNC_VOTEQUORUM_1.0 2.4.2
votequorum_setvotes@COROSYNC_VOTEQUORUM_1.0 2.4.2
votequorum_trackstart@COROSYNC_VOTEQUORUM_1.0 2.4.2
votequorum_trackstop@COROSYNC_VOTEQUORUM_1.0 2.4.2

View File

@ -0,0 +1,35 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ferenc=20W=C3=A1gner?= <wferi@debian.org>
Date: Mon, 10 Dec 2018 18:55:40 +0100
Subject: [PATCH] Enable PrivateTmp in the systemd service files
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
---
init/corosync-notifyd.service.in | 1 +
init/corosync.service.in | 1 +
2 files changed, 2 insertions(+)
diff --git a/init/corosync-notifyd.service.in b/init/corosync-notifyd.service.in
index 410a6837..9247cbcf 100644
--- a/init/corosync-notifyd.service.in
+++ b/init/corosync-notifyd.service.in
@@ -9,6 +9,7 @@ EnvironmentFile=-@INITCONFIGDIR@/corosync-notifyd
ExecStart=@SBINDIR@/corosync-notifyd -f $OPTIONS
Type=notify
Restart=on-failure
+PrivateTmp=yes
[Install]
WantedBy=multi-user.target
diff --git a/init/corosync.service.in b/init/corosync.service.in
index 654e41fc..0c74306b 100644
--- a/init/corosync.service.in
+++ b/init/corosync.service.in
@@ -28,6 +28,7 @@ StandardError=null
#RestartSec=70
# rewrite according to environment.
#ExecStartPre=/sbin/modprobe softdog
+PrivateTmp=yes
[Install]
WantedBy=multi-user.target

View File

@ -0,0 +1,26 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fabian=20Gr=C3=BCnbichler?= <f.gruenbichler@proxmox.com>
Date: Wed, 24 Oct 2018 15:15:33 +0200
Subject: [PATCH] only start corosync.service if conf exists
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
---
init/corosync.service.in | 1 +
1 file changed, 1 insertion(+)
diff --git a/init/corosync.service.in b/init/corosync.service.in
index 0c74306b..adf7080f 100644
--- a/init/corosync.service.in
+++ b/init/corosync.service.in
@@ -2,6 +2,7 @@
Description=Corosync Cluster Engine
Documentation=man:corosync man:corosync.conf man:corosync_overview
ConditionKernelCommandLine=!nocluster
+ConditionPathExists=/etc/corosync/corosync.conf
Requires=network-online.target
After=network-online.target

View File

@ -0,0 +1,119 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fabian=20Gr=C3=BCnbichler?= <f.gruenbichler@proxmox.com>
Date: Wed, 15 May 2019 13:45:13 +0200
Subject: [PATCH] cpg: notify_lib_joinlist: drop conn parameter
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
since it is always set to NULL.
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
(cherry picked from commit c16abe515f895579f11b9012c888b7e067bb99fc)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
---
exec/cpg.c | 54 ++++++++++++++++++++++++------------------------------
1 file changed, 24 insertions(+), 30 deletions(-)
diff --git a/exec/cpg.c b/exec/cpg.c
index e39ca340..b752cc15 100644
--- a/exec/cpg.c
+++ b/exec/cpg.c
@@ -647,7 +647,6 @@ static int notify_lib_totem_membership (
static int notify_lib_joinlist(
const mar_cpg_name_t *group_name,
- void *conn,
int joined_list_entries,
mar_cpg_address_t *joined_list,
int left_list_entries,
@@ -728,40 +727,35 @@ static int notify_lib_joinlist(
retgi += joined_list_entries;
}
- if (conn) {
- api->ipc_dispatch_send (conn, buf, size);
- } else {
qb_list_for_each(iter, &cpg_pd_list_head) {
- struct cpg_pd *cpd = qb_list_entry (iter, struct cpg_pd, list);
- if (mar_name_compare (&cpd->group_name, group_name) == 0) {
- assert (joined_list_entries <= 1);
- if (joined_list_entries) {
- if (joined_list[0].pid == cpd->pid &&
- joined_list[0].nodeid == api->totem_nodeid_get()) {
- cpd->cpd_state = CPD_STATE_JOIN_COMPLETED;
- }
+ struct cpg_pd *cpd = qb_list_entry (iter, struct cpg_pd, list);
+ if (mar_name_compare (&cpd->group_name, group_name) == 0) {
+ assert (joined_list_entries <= 1);
+ if (joined_list_entries) {
+ if (joined_list[0].pid == cpd->pid &&
+ joined_list[0].nodeid == api->totem_nodeid_get()) {
+ cpd->cpd_state = CPD_STATE_JOIN_COMPLETED;
}
- if (cpd->cpd_state == CPD_STATE_JOIN_COMPLETED ||
- cpd->cpd_state == CPD_STATE_LEAVE_STARTED) {
+ }
+ if (cpd->cpd_state == CPD_STATE_JOIN_COMPLETED ||
+ cpd->cpd_state == CPD_STATE_LEAVE_STARTED) {
- api->ipc_dispatch_send (cpd->conn, buf, size);
- cpd->transition_counter++;
- }
- if (left_list_entries) {
- if (left_list[0].pid == cpd->pid &&
- left_list[0].nodeid == api->totem_nodeid_get() &&
- left_list[0].reason == CONFCHG_CPG_REASON_LEAVE) {
-
- cpd->pid = 0;
- memset (&cpd->group_name, 0, sizeof(cpd->group_name));
- cpd->cpd_state = CPD_STATE_UNJOINED;
- }
+ api->ipc_dispatch_send (cpd->conn, buf, size);
+ cpd->transition_counter++;
+ }
+ if (left_list_entries) {
+ if (left_list[0].pid == cpd->pid &&
+ left_list[0].nodeid == api->totem_nodeid_get() &&
+ left_list[0].reason == CONFCHG_CPG_REASON_LEAVE) {
+
+ cpd->pid = 0;
+ memset (&cpd->group_name, 0, sizeof(cpd->group_name));
+ cpd->cpd_state = CPD_STATE_UNJOINED;
}
}
}
}
-
/*
* Traverse thru cpds and send totem membership for cpd, where it is not send yet
*/
@@ -858,7 +852,7 @@ static void downlist_inform_clients (void)
}
/* send confchg event */
- notify_lib_joinlist(&group, NULL,
+ notify_lib_joinlist(&group,
0, NULL,
pcd->left_list_entries,
pcd->left_list,
@@ -1157,7 +1151,7 @@ static void do_proc_join(
notify_info.nodeid = nodeid;
notify_info.reason = reason;
- notify_lib_joinlist(&pi->group, NULL,
+ notify_lib_joinlist(&pi->group,
1, &notify_info,
0, NULL,
MESSAGE_RES_CPG_CONFCHG_CALLBACK);
@@ -1177,7 +1171,7 @@ static void do_proc_leave(
notify_info.nodeid = nodeid;
notify_info.reason = reason;
- notify_lib_joinlist(name, NULL,
+ notify_lib_joinlist(name,
0, NULL,
1, &notify_info,
MESSAGE_RES_CPG_CONFCHG_CALLBACK);

View File

@ -0,0 +1,201 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fabian=20Gr=C3=BCnbichler?= <f.gruenbichler@proxmox.com>
Date: Wed, 8 May 2019 16:31:15 +0200
Subject: [PATCH] cpg: send single confchg event per group on joinlist
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
using a similar approach to
43bead364514e8ae2ba00bcf07c460e31d0b1765
"Send one confchg event per CPG group to CPG client"
which did the same for leave events on a network partition.
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
(cherry picked from commit 7fb247096687d4232b6e90e4c732229b971c8378)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
---
exec/cpg.c | 97 ++++++++++++++++++++++++++++++++++++++++--------------
1 file changed, 73 insertions(+), 24 deletions(-)
diff --git a/exec/cpg.c b/exec/cpg.c
index b752cc15..e04ba579 100644
--- a/exec/cpg.c
+++ b/exec/cpg.c
@@ -194,6 +194,12 @@ struct join_list_entry {
mar_cpg_name_t group_name;
};
+struct join_list_confchg_data {
+ mar_cpg_name_t cpg_group;
+ mar_cpg_address_t join_list[CPG_MEMBERS_MAX];
+ int join_list_entries;
+};
+
/*
* Service Interfaces required by service_message_handler struct
*/
@@ -312,7 +318,8 @@ static void do_proc_join(
const mar_cpg_name_t *name,
uint32_t pid,
unsigned int nodeid,
- int reason);
+ int reason,
+ qb_map_t *group_notify_map);
static void do_proc_leave(
const mar_cpg_name_t *name,
@@ -723,35 +730,46 @@ static int notify_lib_joinlist(
}
if (joined_list_entries) {
+ int i;
+
memcpy (retgi, joined_list, joined_list_entries * sizeof(mar_cpg_address_t));
retgi += joined_list_entries;
+
+ for (i=0; i < joined_list_entries; i++) {
+ if (joined_list[i].nodeid == api->totem_nodeid_get()) {
+ qb_list_for_each(iter, &cpg_pd_list_head) {
+ struct cpg_pd *cpd = qb_list_entry (iter, struct cpg_pd, list);
+ if (mar_name_compare (&cpd->group_name, group_name) == 0 &&
+ joined_list[i].pid == cpd->pid) {
+ cpd->cpd_state = CPD_STATE_JOIN_COMPLETED;
+ }
+ }
+ }
+ }
}
qb_list_for_each(iter, &cpg_pd_list_head) {
struct cpg_pd *cpd = qb_list_entry (iter, struct cpg_pd, list);
if (mar_name_compare (&cpd->group_name, group_name) == 0) {
- assert (joined_list_entries <= 1);
- if (joined_list_entries) {
- if (joined_list[0].pid == cpd->pid &&
- joined_list[0].nodeid == api->totem_nodeid_get()) {
- cpd->cpd_state = CPD_STATE_JOIN_COMPLETED;
- }
- }
if (cpd->cpd_state == CPD_STATE_JOIN_COMPLETED ||
cpd->cpd_state == CPD_STATE_LEAVE_STARTED) {
api->ipc_dispatch_send (cpd->conn, buf, size);
cpd->transition_counter++;
}
- if (left_list_entries) {
- if (left_list[0].pid == cpd->pid &&
- left_list[0].nodeid == api->totem_nodeid_get() &&
- left_list[0].reason == CONFCHG_CPG_REASON_LEAVE) {
-
- cpd->pid = 0;
- memset (&cpd->group_name, 0, sizeof(cpd->group_name));
- cpd->cpd_state = CPD_STATE_UNJOINED;
- }
+ }
+ }
+
+ if (left_list_entries &&
+ left_list[0].nodeid == api->totem_nodeid_get() &&
+ left_list[0].reason == CONFCHG_CPG_REASON_LEAVE) {
+ qb_list_for_each(iter, &cpg_pd_list_head) {
+ struct cpg_pd *cpd = qb_list_entry (iter, struct cpg_pd, list);
+ if (mar_name_compare (&cpd->group_name, group_name) == 0 &&
+ left_list[0].pid == cpd->pid) {
+ cpd->pid = 0;
+ memset (&cpd->group_name, 0, sizeof(cpd->group_name));
+ cpd->cpd_state = CPD_STATE_UNJOINED;
}
}
}
@@ -915,6 +933,11 @@ static void joinlist_inform_clients (void)
struct joinlist_msg *stored_msg;
struct qb_list_head *iter;
unsigned int i;
+ qb_map_t *group_notify_map;
+ qb_map_iter_t *miter;
+ struct join_list_confchg_data *jld;
+
+ group_notify_map = qb_skiplist_create();
i = 0;
qb_list_for_each(iter, &joinlist_messages_head) {
@@ -931,9 +954,19 @@ static void joinlist_inform_clients (void)
}
do_proc_join (&stored_msg->group_name, stored_msg->pid, stored_msg->sender_nodeid,
- CONFCHG_CPG_REASON_NODEUP);
+ CONFCHG_CPG_REASON_NODEUP, group_notify_map);
}
+ miter = qb_map_iter_create(group_notify_map);
+ while (qb_map_iter_next(miter, (void **)&jld)) {
+ notify_lib_joinlist(&jld->cpg_group,
+ jld->join_list_entries, jld->join_list,
+ 0, NULL,
+ MESSAGE_RES_CPG_CONFCHG_CALLBACK);
+ free(jld);
+ }
+ qb_map_iter_free(miter);
+
joinlist_remove_zombie_pi_entries ();
}
@@ -1111,13 +1144,15 @@ static void do_proc_join(
const mar_cpg_name_t *name,
uint32_t pid,
unsigned int nodeid,
- int reason)
+ int reason,
+ qb_map_t *group_notify_map)
{
struct process_info *pi;
struct process_info *pi_entry;
mar_cpg_address_t notify_info;
struct qb_list_head *list;
struct qb_list_head *list_to_add = NULL;
+ int size;
if (process_info_find (name, pid, nodeid) != NULL) {
return ;
@@ -1151,10 +1186,24 @@ static void do_proc_join(
notify_info.nodeid = nodeid;
notify_info.reason = reason;
- notify_lib_joinlist(&pi->group,
- 1, &notify_info,
- 0, NULL,
- MESSAGE_RES_CPG_CONFCHG_CALLBACK);
+ if (group_notify_map == NULL) {
+ notify_lib_joinlist(&pi->group,
+ 1, &notify_info,
+ 0, NULL,
+ MESSAGE_RES_CPG_CONFCHG_CALLBACK);
+ } else {
+ struct join_list_confchg_data *jld = qb_map_get(group_notify_map, pi->group.value);
+ if (jld == NULL) {
+ jld = (struct join_list_confchg_data *)calloc(1, sizeof(struct join_list_confchg_data));
+ memcpy(&jld->cpg_group, &pi->group, sizeof(mar_cpg_name_t));
+ qb_map_put(group_notify_map, jld->cpg_group.value, jld);
+ }
+ size = jld->join_list_entries;
+ jld->join_list[size].nodeid = notify_info.nodeid;
+ jld->join_list[size].pid = notify_info.pid;
+ jld->join_list[size].reason = notify_info.reason;
+ jld->join_list_entries++;
+ }
}
static void do_proc_leave(
@@ -1219,7 +1268,7 @@ static void message_handler_req_exec_cpg_procjoin (
do_proc_join (&req_exec_cpg_procjoin->group_name,
req_exec_cpg_procjoin->pid, nodeid,
- CONFCHG_CPG_REASON_JOIN);
+ CONFCHG_CPG_REASON_JOIN, NULL);
}
static void message_handler_req_exec_cpg_procleave (

View File

@ -0,0 +1,200 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Jan Friesse <jfriesse@redhat.com>
Date: Wed, 15 May 2019 17:39:13 +0200
Subject: [PATCH] cpg: Add more comments to notify_lib_joinlist
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
And make handling of left_list more generic. Also free skiplist
allocated by joinlist_inform_clients function. Last (but not least)
remove czechlish founded (should have been pp of "find").
Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Christine Caulfield <ccaulfie@redhat.com>
Reviewed-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
(cherry picked from commit 1e2df0ba0c341bc1a2a72da4d63e0993bb643909)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
---
exec/cpg.c | 91 +++++++++++++++++++++++++++++++++++-------------------
1 file changed, 60 insertions(+), 31 deletions(-)
diff --git a/exec/cpg.c b/exec/cpg.c
index e04ba579..2ecdc6b4 100644
--- a/exec/cpg.c
+++ b/exec/cpg.c
@@ -663,31 +663,37 @@ static int notify_lib_joinlist(
int size;
char *buf;
struct qb_list_head *iter;
- int count;
+ int member_list_entries;
struct res_lib_cpg_confchg_callback *res;
mar_cpg_address_t *retgi;
+ int i;
- count = 0;
+ /*
+ * Find size of member_list (use process_info_list but remove items in left_list)
+ */
+ member_list_entries = 0;
qb_list_for_each(iter, &process_info_list_head) {
struct process_info *pi = qb_list_entry (iter, struct process_info, list);
+
if (mar_name_compare (&pi->group, group_name) == 0) {
- int i;
- int founded = 0;
+ int in_left_list = 0;
for (i = 0; i < left_list_entries; i++) {
if (left_list[i].nodeid == pi->nodeid && left_list[i].pid == pi->pid) {
- founded++;
+ in_left_list = 1;
+ break ;
}
}
- if (!founded)
- count++;
+ if (!in_left_list) {
+ member_list_entries++;
+ }
}
}
size = sizeof(struct res_lib_cpg_confchg_callback) +
- sizeof(mar_cpg_address_t) * (count + left_list_entries + joined_list_entries);
+ sizeof(mar_cpg_address_t) * (member_list_entries + left_list_entries + joined_list_entries);
buf = alloca(size);
if (!buf)
return CS_ERR_LIBRARY;
@@ -695,27 +701,30 @@ static int notify_lib_joinlist(
res = (struct res_lib_cpg_confchg_callback *)buf;
res->joined_list_entries = joined_list_entries;
res->left_list_entries = left_list_entries;
- res->member_list_entries = count;
+ res->member_list_entries = member_list_entries;
retgi = res->member_list;
res->header.size = size;
res->header.id = id;
res->header.error = CS_OK;
memcpy(&res->group_name, group_name, sizeof(mar_cpg_name_t));
+ /*
+ * Fill res->memberlist. Use process_info_list but remove items in left_list.
+ */
qb_list_for_each(iter, &process_info_list_head) {
- struct process_info *pi=qb_list_entry (iter, struct process_info, list);
+ struct process_info *pi = qb_list_entry (iter, struct process_info, list);
if (mar_name_compare (&pi->group, group_name) == 0) {
- int i;
- int founded = 0;
+ int in_left_list = 0;
- for (i = 0;i < left_list_entries; i++) {
+ for (i = 0; i < left_list_entries; i++) {
if (left_list[i].nodeid == pi->nodeid && left_list[i].pid == pi->pid) {
- founded++;
+ in_left_list = 1;
+ break ;
}
}
- if (!founded) {
+ if (!in_left_list) {
retgi->nodeid = pi->nodeid;
retgi->pid = pi->pid;
retgi->reason = CPG_REASON_UNDEFINED;
@@ -724,23 +733,30 @@ static int notify_lib_joinlist(
}
}
+ /*
+ * Fill res->left_list
+ */
if (left_list_entries) {
memcpy (retgi, left_list, left_list_entries * sizeof(mar_cpg_address_t));
retgi += left_list_entries;
}
if (joined_list_entries) {
- int i;
-
+ /*
+ * Fill res->joined_list
+ */
memcpy (retgi, joined_list, joined_list_entries * sizeof(mar_cpg_address_t));
retgi += joined_list_entries;
- for (i=0; i < joined_list_entries; i++) {
+ /*
+ * Update cpd_state for all local joined processes in group
+ */
+ for (i = 0; i < joined_list_entries; i++) {
if (joined_list[i].nodeid == api->totem_nodeid_get()) {
- qb_list_for_each(iter, &cpg_pd_list_head) {
+ qb_list_for_each(iter, &cpg_pd_list_head) {
struct cpg_pd *cpd = qb_list_entry (iter, struct cpg_pd, list);
- if (mar_name_compare (&cpd->group_name, group_name) == 0 &&
- joined_list[i].pid == cpd->pid) {
+ if (joined_list[i].pid == cpd->pid &&
+ mar_name_compare (&cpd->group_name, group_name) == 0) {
cpd->cpd_state = CPD_STATE_JOIN_COMPLETED;
}
}
@@ -748,6 +764,9 @@ static int notify_lib_joinlist(
}
}
+ /*
+ * Send notification to all ipc clients joined in group_name
+ */
qb_list_for_each(iter, &cpg_pd_list_head) {
struct cpg_pd *cpd = qb_list_entry (iter, struct cpg_pd, list);
if (mar_name_compare (&cpd->group_name, group_name) == 0) {
@@ -760,16 +779,25 @@ static int notify_lib_joinlist(
}
}
- if (left_list_entries &&
- left_list[0].nodeid == api->totem_nodeid_get() &&
- left_list[0].reason == CONFCHG_CPG_REASON_LEAVE) {
- qb_list_for_each(iter, &cpg_pd_list_head) {
- struct cpg_pd *cpd = qb_list_entry (iter, struct cpg_pd, list);
- if (mar_name_compare (&cpd->group_name, group_name) == 0 &&
- left_list[0].pid == cpd->pid) {
- cpd->pid = 0;
- memset (&cpd->group_name, 0, sizeof(cpd->group_name));
- cpd->cpd_state = CPD_STATE_UNJOINED;
+ if (left_list_entries) {
+ /*
+ * Zero internal cpd state for all local processes leaving group
+ * (this loop is not strictly needed because left_list always either
+ * contains exactly one process running on local node or more items
+ * but none of them is running on local node)
+ */
+ for (i = 0; i < joined_list_entries; i++) {
+ if (left_list[i].nodeid == api->totem_nodeid_get() &&
+ left_list[i].reason == CONFCHG_CPG_REASON_LEAVE) {
+ qb_list_for_each(iter, &cpg_pd_list_head) {
+ struct cpg_pd *cpd = qb_list_entry (iter, struct cpg_pd, list);
+ if (left_list[i].pid == cpd->pid &&
+ mar_name_compare (&cpd->group_name, group_name) == 0) {
+ cpd->pid = 0;
+ memset (&cpd->group_name, 0, sizeof(cpd->group_name));
+ cpd->cpd_state = CPD_STATE_UNJOINED;
+ }
+ }
}
}
}
@@ -966,6 +994,7 @@ static void joinlist_inform_clients (void)
free(jld);
}
qb_map_iter_free(miter);
+ qb_map_destroy(group_notify_map);
joinlist_remove_zombie_pi_entries ();
}

View File

@ -0,0 +1,137 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Jan Friesse <jfriesse@redhat.com>
Date: Thu, 16 May 2019 14:08:25 +0200
Subject: [PATCH] cpg: Move filling of member_list to subfunction
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Christine Caulfield <ccaulfie@redhat.com>
Reviewed-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
(cherry picked from commit 3c7f19a02fbff19414638952043691d92be86d41)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
---
exec/cpg.c | 86 +++++++++++++++++++++++++++++++-----------------------
1 file changed, 50 insertions(+), 36 deletions(-)
diff --git a/exec/cpg.c b/exec/cpg.c
index 2ecdc6b4..98a16a60 100644
--- a/exec/cpg.c
+++ b/exec/cpg.c
@@ -652,26 +652,27 @@ static int notify_lib_totem_membership (
return CS_OK;
}
-static int notify_lib_joinlist(
+/*
+ * Helper function for notify_lib_joinlist which prepares member_list using
+ * process_info_list with removed left_list items.
+ * member_list_entries - When not NULL it contains number of member_list entries
+ * member_list - When not NULL it is used as pointer to start of preallocated
+ * array of members. Pointer is adjusted to the end of array on
+ * exit.
+ */
+static void notify_lib_joinlist_fill_member_list(
const mar_cpg_name_t *group_name,
- int joined_list_entries,
- mar_cpg_address_t *joined_list,
int left_list_entries,
- mar_cpg_address_t *left_list,
- int id)
+ const mar_cpg_address_t *left_list,
+ int *member_list_entries,
+ mar_cpg_address_t **member_list)
{
- int size;
- char *buf;
struct qb_list_head *iter;
- int member_list_entries;
- struct res_lib_cpg_confchg_callback *res;
- mar_cpg_address_t *retgi;
int i;
- /*
- * Find size of member_list (use process_info_list but remove items in left_list)
- */
- member_list_entries = 0;
+ if (member_list_entries != NULL) {
+ *member_list_entries = 0;
+ }
qb_list_for_each(iter, &process_info_list_head) {
struct process_info *pi = qb_list_entry (iter, struct process_info, list);
@@ -687,10 +688,42 @@ static int notify_lib_joinlist(
}
if (!in_left_list) {
- member_list_entries++;
+ if (member_list_entries != NULL) {
+ (*member_list_entries)++;
+ }
+
+ if (member_list != NULL) {
+ (*member_list)->nodeid = pi->nodeid;
+ (*member_list)->pid = pi->pid;
+ (*member_list)->reason = CPG_REASON_UNDEFINED;
+ (*member_list)++;
+ }
}
}
}
+}
+
+static int notify_lib_joinlist(
+ const mar_cpg_name_t *group_name,
+ int joined_list_entries,
+ mar_cpg_address_t *joined_list,
+ int left_list_entries,
+ mar_cpg_address_t *left_list,
+ int id)
+{
+ int size;
+ char *buf;
+ struct qb_list_head *iter;
+ int member_list_entries;
+ struct res_lib_cpg_confchg_callback *res;
+ mar_cpg_address_t *retgi;
+ int i;
+
+ /*
+ * Find size of member_list (use process_info_list but remove items in left_list)
+ */
+ notify_lib_joinlist_fill_member_list(group_name, left_list_entries, left_list,
+ &member_list_entries, NULL);
size = sizeof(struct res_lib_cpg_confchg_callback) +
sizeof(mar_cpg_address_t) * (member_list_entries + left_list_entries + joined_list_entries);
@@ -711,27 +744,8 @@ static int notify_lib_joinlist(
/*
* Fill res->memberlist. Use process_info_list but remove items in left_list.
*/
- qb_list_for_each(iter, &process_info_list_head) {
- struct process_info *pi = qb_list_entry (iter, struct process_info, list);
-
- if (mar_name_compare (&pi->group, group_name) == 0) {
- int in_left_list = 0;
-
- for (i = 0; i < left_list_entries; i++) {
- if (left_list[i].nodeid == pi->nodeid && left_list[i].pid == pi->pid) {
- in_left_list = 1;
- break ;
- }
- }
-
- if (!in_left_list) {
- retgi->nodeid = pi->nodeid;
- retgi->pid = pi->pid;
- retgi->reason = CPG_REASON_UNDEFINED;
- retgi++;
- }
- }
- }
+ notify_lib_joinlist_fill_member_list(group_name, left_list_entries, left_list,
+ NULL, &retgi);
/*
* Fill res->left_list

View File

@ -0,0 +1,48 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Thomas Lamprecht <t.lamprecht@proxmox.com>
Date: Fri, 14 Jun 2019 18:31:16 +0200
Subject: [PATCH] totem: fix check if all nodes have name attrs in multi-link
setups
As totem_config->interfaces entries are _all_ possible links and not
only the configured ones we cannot trust that interface[0] is
configured at the time of checking, and thus has a valid
member_count. So set the members variable to the member_count entry
from an actually configured interface and loop over that one.
This fixes a case where the check for the name property on all nodes
for multi links was skipped if link 0 was not configured, as then its
member_count was 0.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Reviewed-by: Christine Caulfield <ccaulfie@redhat.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
(cherry picked from commit 7ada508a82680dcf23510e585ec295b10ac5da11)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
---
exec/totemconfig.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/exec/totemconfig.c b/exec/totemconfig.c
index ff86e232..dfde90df 100644
--- a/exec/totemconfig.c
+++ b/exec/totemconfig.c
@@ -449,14 +449,15 @@ static int totem_volatile_config_validate (
num_configured = 0;
for (i = 0; i < INTERFACE_MAX; i++) {
if (totem_config->interfaces[i].configured) {
+ if (num_configured == 0) {
+ members = totem_config->interfaces[i].member_count;
+ }
num_configured++;
}
}
if (num_configured > 1) {
- members = totem_config->interfaces[0].member_count;
-
- for (i=0; i<totem_config->interfaces[0].member_count; i++) {
+ for (i=0; i < members; i++) {
snprintf(name_key, sizeof(name_key), "nodelist.node.%d.name", i);
if (icmap_get_string(name_key, &name_str) != CS_OK) {

View File

@ -0,0 +1,40 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Thomas Lamprecht <t.lamprecht@proxmox.com>
Date: Fri, 14 Jun 2019 18:56:57 +0200
Subject: [PATCH] totem: fix check if all nodes have same number of links
configured links may not come in order in the interfaces array, which
holds an entry for _all_ possible links, not just configured ones.
So iterate through all interfaces, but skip those which are not
configured. This allows to start corosync with a configuration where
link 0 is currently not mentioned, as else it was checked but had
member_count = 0 from it's default initialization, which then made
this code report a false positive for the "Not all nodes have the
same number of links" check even on a correct config.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Reviewed-by: Christine Caulfield <ccaulfie@redhat.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
(cherry picked from commit 816324c94cfb917b11f43954b8757424db28b390)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
---
exec/totemconfig.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/exec/totemconfig.c b/exec/totemconfig.c
index dfde90df..67a61ac2 100644
--- a/exec/totemconfig.c
+++ b/exec/totemconfig.c
@@ -467,7 +467,10 @@ static int totem_volatile_config_validate (
}
}
- for (i=0; i<num_configured; i++) {
+ for (i=0; i < INTERFACE_MAX; i++) {
+ if (!totem_config->interfaces[i].configured) {
+ continue;
+ }
if (totem_config->interfaces[i].member_count != members) {
snprintf (local_error_reason, sizeof(local_error_reason),
"Not all nodes have the same number of links");

8
debian/patches/series vendored Normal file
View File

@ -0,0 +1,8 @@
0001-Enable-PrivateTmp-in-the-systemd-service-files.patch
0002-only-start-corosync.service-if-conf-exists.patch
0003-cpg-notify_lib_joinlist-drop-conn-parameter.patch
0004-cpg-send-single-confchg-event-per-group-on-joinlist.patch
0005-cpg-Add-more-comments-to-notify_lib_joinlist.patch
0006-cpg-Move-filling-of-member_list-to-subfunction.patch
0007-totem-fix-check-if-all-nodes-have-name-attrs-in-mult.patch
0008-totem-fix-check-if-all-nodes-have-same-number-of-lin.patch

71
debian/rules vendored Executable file
View File

@ -0,0 +1,71 @@
#!/usr/bin/make -f
# see FEATURE AREAS in dpkg-buildflags(1)
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
# Ensure that we link against all needed libraries (cf. Policy 10.2)
export DEB_LDFLAGS_MAINT_APPEND=-Wl,-z,defs
ifneq ($(wildcard /usr/include/statgrab.h),)
enable-monitoring=--enable-monitoring
endif
ifneq ($(wildcard /usr/include/linux/watchdog.h),)
enable-watchdog=--enable-watchdog
endif
ifneq ($(wildcard /usr/include/systemd/sd-daemon.h),)
enable-systemd=--enable-systemd
initscript-dir=usr/share/corosync
else
initscript-dir=etc/init.d
endif
%:
dh $@
# Avoid useless dependencies in the libraries
override_dh_autoreconf:
dh_autoreconf --as-needed
# Explicit BASHPATH fixes reproducible build on merged-usr vs non-merged:
override_dh_auto_configure:
dh_auto_configure -- \
BASHPATH=/bin/bash \
--with-initconfigdir=/etc/default \
--with-logdir=/var/log/corosync \
--enable-dbus \
$(enable-monitoring) \
$(enable-watchdog) \
--disable-augeas \
--enable-snmp \
--enable-xmlconf \
$(enable-systemd) \
--disable-static
override_dh_auto_build-indep:
$(MAKE) -C man
$(MAKE) doxygen
find doc/api/html -name "*.md5" -print -delete
# The check target would unnecessarily build the software
override_dh_auto_test-indep:
override_dh_auto_install-indep:
$(MAKE) -C man DESTDIR="$(CURDIR)/debian/tmp" install
override_dh_auto_install-arch:
dh_auto_install
rm -v debian/tmp/usr/lib/*/lib*.la
# we don't need the upstream license
rm debian/tmp/usr/share/doc/corosync/LICENSE
override_dh_missing:
dh_missing --fail-missing
override_dh_gencontrol:
debian/check_header_deps
dh_gencontrol
# dwz fails with "Allocatable section in [...] after non-allocatable ones"
override_dh_dwz:

1
debian/source/format vendored Normal file
View File

@ -0,0 +1 @@
3.0 (quilt)

3
debian/tests/control vendored Normal file
View File

@ -0,0 +1,3 @@
Depends: @
Restrictions: needs-root, allow-stderr, isolation-container
Tests: corosync

6
debian/tests/corosync vendored Executable file
View File

@ -0,0 +1,6 @@
#!/bin/sh
set -ex
corosync-cfgtool -s | grep -C 20 'node 0: link enabled:1 link connected:1'
corosync-quorumtool | grep -C 20 ' 1 node1 (local)'

28
debian/upstream/signing-key.asc vendored Normal file
View File

@ -0,0 +1,28 @@
-----BEGIN PGP PUBLIC KEY BLOCK-----
mQINBFByeXcBEAC/nGvC9wpsm+nmHg0oB7Y5yHdzO8YTMIO1dIc6x6oz4S7+JidH
omxyqvdBKdH7f30//0leCptIXUXoRhlYOFQK4hMDkFHHBpuswc/WzzV87P1FhFs/
XittxTFpe1jwITNgficTcPUBNOkmrWKKgIGXsPvriK1X8XCGXE+bL8yrM+HQwHyG
ubMZvALfNaSRNPD1dhIffb23pCD2jAxX6W133e48sKCs4FHJPitTkUbqlcPBscAc
aRYrxbvG6sJxWkFg4P+B6awPm4I1R5gs+SXTQ9XC9NuAmw0fpkTZBKODmlKqrCkX
2rjINZR0rRHmmuy4tXWlIrPLUH+UpnxFiTMByGAxnU0udQ0bcO+BDumqWYMj18Q9
i+pbjAnYyELFlItsshZ5ybZ3m7SPbDvy1zdJoAXqhjI243kQ2s0PX6u91eF0lkAT
axpDQTLP2OVTLLxp6nMjgAtmQipiMuw8UANOvAZg/zuER8yT2ifE5HLq9Sw6uGDx
6jyGEsCPIJOVn3Udzm0kKi/3mXovvWXNV2VYs5BDQ6LE+iI2wrbTkF4wu6RRHBmG
Xcc9hH5q6p11Xh1ZZqqZfIb6tA8bHXFZUjd+fklHDAYUfu2hry434JyyEcvEAsPA
DJTKi3hipy5sQ67YVU7St7RD9VCf3+BMzHsj11zxz/v0OGsKfkiXcM+RzwARAQAB
tDNDb3Jvc3luYyBSZWxlYXNlIFNpZ25pbmcgS2V5IDxkaXNjdXNzQGNvcm9zeW5j
Lm9yZz6JAjYEEwECACAFAlByeXcCGwMGCwkIBwMCBBUCCAMEFgIDAQIeAQIXgAAK
CRDf0BXKVVywIA0OD/0Sdb/l8mlB9M3v6d3j5pvgZG4ReXD/iOqMM7TRstsSuTRO
Rwo6O9MWWuA92Q/PYn/PcI4IJTfZ5oqdxpojPdRRlUJxFWkSL7q19XJh9rbQt9kk
pC/rtCh5RX3g4EurmTigVZfJrykN1Q6RA/myVRFcKAzjCocT4KHJr0Vx+38fx6Kl
O2fGPqWPK++0IWN5jyxtsi47pKtONmIMyUXbjwNLrmPe5qo6+HBrNy6h/rzqnsoU
63+pPC2APR9KYyg+7yi1rljcS39ZMKsGwxiFowpKTKIc4SojZ5oNuwZ6y+LwPjxV
AppEit9eaQCMaK/AchcrPUUhAliVXoGXq0qqZ6JoQYv31PdR+FpiU64HToqeX3Eb
lfqQnV68xVk/Wg4kgBGoSqnLEA0X8tZG45P9WdW3+vbIjRsFR+ac5w9JOm6VPEF3
pohCD6IHzJ67/S2/ehLeUEgvXgh3yaqiDLnthH+q1znC82lQgOqV5++0GNysfsJ/
pbhNtcJ4Ft3+TkEDiFT5IohxkO7bYKiFk2VU97JgodUB5u6tHt91FpJYeUUS0wJ3
3kiaYTLZzixaZvJLYDO5Ddv4M+pxoRDe22JwqyevOP2yOg8pMbIv3JbneN9X7Rar
ZYyPK5z1oBhhmhbX+7CQbS1qPVXU6OOm/3UX48+npf1upK4Sgwa3T6mzIUE/9Q==
=A2iJ
-----END PGP PUBLIC KEY BLOCK-----

4
debian/watch vendored Normal file
View File

@ -0,0 +1,4 @@
version=4
opts=pgpsigurlmangle=s/$/.asc/ \
http://build.clusterlabs.org/corosync/releases/corosync@ANY_VERSION@@ARCHIVE_EXT@

File diff suppressed because it is too large Load Diff

View File

@ -1,115 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fabian=20Gr=C3=BCnbichler?= <f.gruenbichler@proxmox.com>
Date: Wed, 22 May 2019 11:14:01 +0200
Subject: [PATCH] don't install default corosync.conf
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
---
.../Make-the-example-config-valid.patch | 64 -------------------
debian/corosync.install | 2 +-
debian/rules | 3 -
3 files changed, 1 insertion(+), 68 deletions(-)
delete mode 100644 debian/patches/Make-the-example-config-valid.patch
diff --git a/debian/patches/Make-the-example-config-valid.patch b/debian/patches/Make-the-example-config-valid.patch
deleted file mode 100644
index 5c2182f7..00000000
--- a/debian/patches/Make-the-example-config-valid.patch
+++ /dev/null
@@ -1,64 +0,0 @@
-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 | 22 +++++++---------------
- 1 file changed, 7 insertions(+), 15 deletions(-)
-
-diff --git a/conf/corosync.conf.example b/conf/corosync.conf.example
-index 4658a86..91de572 100644
---- a/conf/corosync.conf.example
-+++ b/conf/corosync.conf.example
-@@ -2,8 +2,10 @@
- totem {
- version: 2
-
-- # Set name of the cluster
-- cluster_name: ExampleCluster
-+ # 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
-@@ -25,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.
-@@ -41,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 {
-@@ -53,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
-- }
- # ...
- }
diff --git a/debian/corosync.install b/debian/corosync.install
index bfaca759..c5b92661 100644
--- a/debian/corosync.install
+++ b/debian/corosync.install
@@ -25,7 +25,7 @@ usr/share/doc/corosync/AUTHORS
usr/share/doc/corosync/INSTALL
usr/share/augeas/lenses/corosync.aug
usr/share/augeas/lenses/tests/test_corosync.aug
-etc/corosync/corosync.conf
+etc/corosync/corosync.*example* usr/share/doc/corosync/examples
etc/corosync/uidgid.d
usr/share/corosync/xml2conf.xsl
var/lib/corosync
diff --git a/debian/rules b/debian/rules
index 52ff4699..50d89e2a 100755
--- a/debian/rules
+++ b/debian/rules
@@ -54,11 +54,8 @@ override_dh_auto_test-indep:
override_dh_auto_install-indep:
$(MAKE) -C man DESTDIR="$(CURDIR)/debian/tmp" install
-CONF=debian/tmp/etc/corosync/corosync.conf
override_dh_auto_install-arch:
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
# we don't need the upstream license
rm debian/tmp/usr/share/doc/corosync/LICENSE

View File

@ -1,140 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fabian=20Gr=C3=BCnbichler?= <f.gruenbichler@proxmox.com>
Date: Wed, 8 Mar 2017 12:59:37 +0100
Subject: [PATCH] remove init script
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
---
debian/corosync.init | 120 -------------------------------------------
1 file changed, 120 deletions(-)
delete mode 100644 debian/corosync.init
diff --git a/debian/corosync.init b/debian/corosync.init
deleted file mode 100644
index ff5ee9f7..00000000
--- a/debian/corosync.init
+++ /dev/null
@@ -1,120 +0,0 @@
-#! /bin/sh
-#
-### BEGIN INIT INFO
-# Provides: corosync
-# Required-Start: $network $remote_fs $syslog
-# Required-Stop: $network $remote_fs $syslog
-# Default-Start: 2 3 4 5
-# Default-Stop: 0 1 6
-# Short-Description: corosync cluster framework
-# Description: Manages the Corosync Cluster Engine.
-### END INIT INFO
-
-# Author: Fabio M. Di Nitto <fabbione@ubuntu.com>
-
-# PATH should only include /usr/* if it runs after the mountnfs.sh script
-PATH=/usr/sbin:/usr/bin:/sbin:/bin
-DESC="corosync daemon"
-NAME=corosync
-DAEMON=/usr/sbin/$NAME
-OPTIONS=""
-PIDFILE=/var/run/$NAME.pid
-SCRIPTNAME=/etc/init.d/$NAME
-PIDFILE=/var/run/corosync.pid
-RARUNDIR=/var/run/resource-agents
-
-# Exit if the package is not installed
-[ -x "$DAEMON" ] || exit 0
-
-# Read configuration variable file if it is present
-[ -r /etc/default/corosync ] && . /etc/default/corosync
-
-# Make sure the Resource Agents run dir exists. Otherwise create it.
-[ -d "$RARUNDIR" ] || mkdir -p $RARUNDIR
-
-# Define LSB log_* functions.
-# Depend on lsb-base (>= 3.0-6) to ensure that this file is present.
-. /lib/lsb/init-functions
-
-#
-# Function that starts the daemon/service
-#
-do_start()
-{
- # Return
- # 0 if daemon has been started
- # 1 if daemon was already running
- # 2 if daemon could not be started
- start-stop-daemon --start --quiet --exec $DAEMON --test > /dev/null \
- || return 1
- start-stop-daemon --start --quiet --exec $DAEMON -- $OPTIONS \
- || return 2
- # Add code here, if necessary, that waits for the process to be ready
- # to handle requests from services started subsequently which depend
- # on this one. As a last resort, sleep for some time.
- pidof corosync > $PIDFILE
-}
-
-#
-# Function that stops the daemon/service
-#
-do_stop()
-{
- # Return
- # 0 if daemon has been stopped
- # 1 if daemon was already stopped
- # 2 if daemon could not be stopped
- # other if a failure occurred
- start-stop-daemon --stop --quiet --retry forever/QUIT/1 --pidfile $PIDFILE
- RETVAL="$?"
- [ "$RETVAL" = 2 ] && return 2
- # Many daemons don't delete their pidfiles when they exit.
- rm -f $PIDFILE
- return "$RETVAL"
-}
-
-case "$1" in
- start)
- log_daemon_msg "Starting $DESC" "$NAME"
- do_start
- case "$?" in
- 0|1) log_end_msg 0 ;;
- 2) log_end_msg 1 ;;
- esac
- ;;
- stop)
- log_daemon_msg "Stopping $DESC" "$NAME"
- do_stop
- case "$?" in
- 0|1) log_end_msg 0 ;;
- 2) log_end_msg 1 ;;
- esac
- ;;
- restart|force-reload)
- log_daemon_msg "Restarting $DESC" "$NAME"
- do_stop
- case "$?" in
- 0|1)
- do_start
- case "$?" in
- 0) log_end_msg 0 ;;
- 1) log_end_msg 1 ;; # Old process is still running
- *) log_end_msg 1 ;; # Failed to start
- esac
- ;;
- *)
- # Failed to stop
- log_end_msg 1
- ;;
- esac
- ;;
- status|monitor)
- status_of_proc -p $PIDFILE $DAEMON $NAME && exit 0 || exit $?
- ;;
- *)
- echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2
- exit 3
- ;;
-esac
-
-:

View File

@ -1,54 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Thomas Lamprecht <t.lamprecht@proxmox.com>
Date: Fri, 9 Nov 2018 13:24:18 +0100
Subject: [PATCH] bsys: disable augeas-tools
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
---
debian/control | 1 -
debian/corosync.install | 2 --
debian/rules | 2 +-
3 files changed, 1 insertion(+), 4 deletions(-)
diff --git a/debian/control b/debian/control
index 8a0855ce..717638e1 100644
--- a/debian/control
+++ b/debian/control
@@ -7,7 +7,6 @@ Uploaders:
Ferenc Wágner <wferi@debian.org>,
Standards-Version: 4.3.0
Build-Depends:
- augeas-tools,
debhelper (>= 12~),
dctrl-tools,
groff,
diff --git a/debian/corosync.install b/debian/corosync.install
index c5b92661..dd3682b0 100644
--- a/debian/corosync.install
+++ b/debian/corosync.install
@@ -23,8 +23,6 @@ usr/share/man/man8/cmap_keys.8
usr/share/doc/corosync/README.recovery
usr/share/doc/corosync/AUTHORS
usr/share/doc/corosync/INSTALL
-usr/share/augeas/lenses/corosync.aug
-usr/share/augeas/lenses/tests/test_corosync.aug
etc/corosync/corosync.*example* usr/share/doc/corosync/examples
etc/corosync/uidgid.d
usr/share/corosync/xml2conf.xsl
diff --git a/debian/rules b/debian/rules
index 50d89e2a..ee051926 100755
--- a/debian/rules
+++ b/debian/rules
@@ -37,7 +37,7 @@ override_dh_auto_configure:
--enable-dbus \
$(enable-monitoring) \
$(enable-watchdog) \
- --enable-augeas \
+ --disable-augeas \
--enable-snmp \
--enable-xmlconf \
$(enable-systemd) \

View File

@ -1,54 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fabian=20Gr=C3=BCnbichler?= <f.gruenbichler@proxmox.com>
Date: Wed, 24 Oct 2018 15:15:33 +0200
Subject: [PATCH] only start corosync.service if conf exists
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
---
...tart-corosync.service-if-conf-exists.patch | 24 +++++++++++++++++++
debian/patches/series | 1 +
2 files changed, 25 insertions(+)
create mode 100644 debian/patches/pve__only-start-corosync.service-if-conf-exists.patch
diff --git a/debian/patches/pve__only-start-corosync.service-if-conf-exists.patch b/debian/patches/pve__only-start-corosync.service-if-conf-exists.patch
new file mode 100644
index 00000000..d3bd7ac5
--- /dev/null
+++ b/debian/patches/pve__only-start-corosync.service-if-conf-exists.patch
@@ -0,0 +1,24 @@
+From: =?utf-8?q?Fabian_Gr=C3=BCnbichler?= <f.gruenbichler@proxmox.com>
+Date: Mon, 13 Mar 2017 13:27:49 +0100
+Subject: only start corosync.service if conf exists
+MIME-Version: 1.0
+Content-Type: text/plain; charset="utf-8"
+Content-Transfer-Encoding: 8bit
+
+Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
+---
+ init/corosync.service.in | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/init/corosync.service.in b/init/corosync.service.in
+index 0c74306..adf7080 100644
+--- a/init/corosync.service.in
++++ b/init/corosync.service.in
+@@ -2,6 +2,7 @@
+ Description=Corosync Cluster Engine
+ Documentation=man:corosync man:corosync.conf man:corosync_overview
+ ConditionKernelCommandLine=!nocluster
++ConditionPathExists=/etc/corosync/corosync.conf
+ Requires=network-online.target
+ After=network-online.target
+
diff --git a/debian/patches/series b/debian/patches/series
index ea6e04ea..803038e4 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -51,3 +51,4 @@ vqsim-Check-result-of-icmap_set_uint32.patch
vqsim-Check-length-of-copied-optarg.patch
Fix-various-typos-in-ChangeLog.patch
Enable-PrivateTmp-in-the-systemd-service-files.patch
+pve__only-start-corosync.service-if-conf-exists.patch

View File

@ -1,697 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fabian=20Gr=C3=BCnbichler?= <f.gruenbichler@proxmox.com>
Date: Wed, 22 May 2019 12:27:19 +0200
Subject: [PATCH] CPG callback merging
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
cherry-picked from upstream PR 468.
this series aims to minimize callback calls in case of cluster cold
starts or re-joining after network partitions, which cause a huge spike
in network load on bigger clusters running pmxcfs.
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
---
...more-comments-to-notify_lib_joinlist.patch | 193 +++++++++++++++++
...illing-of-member_list-to-subfunction.patch | 130 ++++++++++++
...ify_lib_joinlist-drop-conn-parameter.patch | 112 ++++++++++
...-confchg-event-per-group-on-joinlist.patch | 199 ++++++++++++++++++
debian/patches/series | 4 +
5 files changed, 638 insertions(+)
create mode 100644 debian/patches/cpg-Add-more-comments-to-notify_lib_joinlist.patch
create mode 100644 debian/patches/cpg-Move-filling-of-member_list-to-subfunction.patch
create mode 100644 debian/patches/cpg-notify_lib_joinlist-drop-conn-parameter.patch
create mode 100644 debian/patches/cpg-send-single-confchg-event-per-group-on-joinlist.patch
diff --git a/debian/patches/cpg-Add-more-comments-to-notify_lib_joinlist.patch b/debian/patches/cpg-Add-more-comments-to-notify_lib_joinlist.patch
new file mode 100644
index 00000000..e32102fa
--- /dev/null
+++ b/debian/patches/cpg-Add-more-comments-to-notify_lib_joinlist.patch
@@ -0,0 +1,193 @@
+From: Jan Friesse <jfriesse@redhat.com>
+Date: Wed, 15 May 2019 17:39:13 +0200
+Subject: cpg: Add more comments to notify_lib_joinlist
+
+And make handling of left_list more generic. Also free skiplist
+allocated by joinlist_inform_clients function. Last (but not least)
+remove czechlish founded (should have been pp of "find").
+
+Signed-off-by: Jan Friesse <jfriesse@redhat.com>
+(cherry picked from commit 10702c7e6c0cf8164ad8f05acb4e334461555973)
+---
+ exec/cpg.c | 91 +++++++++++++++++++++++++++++++++++++++++---------------------
+ 1 file changed, 60 insertions(+), 31 deletions(-)
+
+diff --git a/exec/cpg.c b/exec/cpg.c
+index e04ba57..2ecdc6b 100644
+--- a/exec/cpg.c
++++ b/exec/cpg.c
+@@ -663,31 +663,37 @@ static int notify_lib_joinlist(
+ int size;
+ char *buf;
+ struct qb_list_head *iter;
+- int count;
++ int member_list_entries;
+ struct res_lib_cpg_confchg_callback *res;
+ mar_cpg_address_t *retgi;
++ int i;
+
+- count = 0;
++ /*
++ * Find size of member_list (use process_info_list but remove items in left_list)
++ */
++ member_list_entries = 0;
+
+ qb_list_for_each(iter, &process_info_list_head) {
+ struct process_info *pi = qb_list_entry (iter, struct process_info, list);
++
+ if (mar_name_compare (&pi->group, group_name) == 0) {
+- int i;
+- int founded = 0;
++ int in_left_list = 0;
+
+ for (i = 0; i < left_list_entries; i++) {
+ if (left_list[i].nodeid == pi->nodeid && left_list[i].pid == pi->pid) {
+- founded++;
++ in_left_list = 1;
++ break ;
+ }
+ }
+
+- if (!founded)
+- count++;
++ if (!in_left_list) {
++ member_list_entries++;
++ }
+ }
+ }
+
+ size = sizeof(struct res_lib_cpg_confchg_callback) +
+- sizeof(mar_cpg_address_t) * (count + left_list_entries + joined_list_entries);
++ sizeof(mar_cpg_address_t) * (member_list_entries + left_list_entries + joined_list_entries);
+ buf = alloca(size);
+ if (!buf)
+ return CS_ERR_LIBRARY;
+@@ -695,27 +701,30 @@ static int notify_lib_joinlist(
+ res = (struct res_lib_cpg_confchg_callback *)buf;
+ res->joined_list_entries = joined_list_entries;
+ res->left_list_entries = left_list_entries;
+- res->member_list_entries = count;
++ res->member_list_entries = member_list_entries;
+ retgi = res->member_list;
+ res->header.size = size;
+ res->header.id = id;
+ res->header.error = CS_OK;
+ memcpy(&res->group_name, group_name, sizeof(mar_cpg_name_t));
+
++ /*
++ * Fill res->memberlist. Use process_info_list but remove items in left_list.
++ */
+ qb_list_for_each(iter, &process_info_list_head) {
+- struct process_info *pi=qb_list_entry (iter, struct process_info, list);
++ struct process_info *pi = qb_list_entry (iter, struct process_info, list);
+
+ if (mar_name_compare (&pi->group, group_name) == 0) {
+- int i;
+- int founded = 0;
++ int in_left_list = 0;
+
+- for (i = 0;i < left_list_entries; i++) {
++ for (i = 0; i < left_list_entries; i++) {
+ if (left_list[i].nodeid == pi->nodeid && left_list[i].pid == pi->pid) {
+- founded++;
++ in_left_list = 1;
++ break ;
+ }
+ }
+
+- if (!founded) {
++ if (!in_left_list) {
+ retgi->nodeid = pi->nodeid;
+ retgi->pid = pi->pid;
+ retgi->reason = CPG_REASON_UNDEFINED;
+@@ -724,23 +733,30 @@ static int notify_lib_joinlist(
+ }
+ }
+
++ /*
++ * Fill res->left_list
++ */
+ if (left_list_entries) {
+ memcpy (retgi, left_list, left_list_entries * sizeof(mar_cpg_address_t));
+ retgi += left_list_entries;
+ }
+
+ if (joined_list_entries) {
+- int i;
+-
++ /*
++ * Fill res->joined_list
++ */
+ memcpy (retgi, joined_list, joined_list_entries * sizeof(mar_cpg_address_t));
+ retgi += joined_list_entries;
+
+- for (i=0; i < joined_list_entries; i++) {
++ /*
++ * Update cpd_state for all local joined processes in group
++ */
++ for (i = 0; i < joined_list_entries; i++) {
+ if (joined_list[i].nodeid == api->totem_nodeid_get()) {
+- qb_list_for_each(iter, &cpg_pd_list_head) {
++ qb_list_for_each(iter, &cpg_pd_list_head) {
+ struct cpg_pd *cpd = qb_list_entry (iter, struct cpg_pd, list);
+- if (mar_name_compare (&cpd->group_name, group_name) == 0 &&
+- joined_list[i].pid == cpd->pid) {
++ if (joined_list[i].pid == cpd->pid &&
++ mar_name_compare (&cpd->group_name, group_name) == 0) {
+ cpd->cpd_state = CPD_STATE_JOIN_COMPLETED;
+ }
+ }
+@@ -748,6 +764,9 @@ static int notify_lib_joinlist(
+ }
+ }
+
++ /*
++ * Send notification to all ipc clients joined in group_name
++ */
+ qb_list_for_each(iter, &cpg_pd_list_head) {
+ struct cpg_pd *cpd = qb_list_entry (iter, struct cpg_pd, list);
+ if (mar_name_compare (&cpd->group_name, group_name) == 0) {
+@@ -760,16 +779,25 @@ static int notify_lib_joinlist(
+ }
+ }
+
+- if (left_list_entries &&
+- left_list[0].nodeid == api->totem_nodeid_get() &&
+- left_list[0].reason == CONFCHG_CPG_REASON_LEAVE) {
+- qb_list_for_each(iter, &cpg_pd_list_head) {
+- struct cpg_pd *cpd = qb_list_entry (iter, struct cpg_pd, list);
+- if (mar_name_compare (&cpd->group_name, group_name) == 0 &&
+- left_list[0].pid == cpd->pid) {
+- cpd->pid = 0;
+- memset (&cpd->group_name, 0, sizeof(cpd->group_name));
+- cpd->cpd_state = CPD_STATE_UNJOINED;
++ if (left_list_entries) {
++ /*
++ * Zero internal cpd state for all local processes leaving group
++ * (this loop is not strictly needed because left_list always either
++ * contains exactly one process running on local node or more items
++ * but none of them is running on local node)
++ */
++ for (i = 0; i < joined_list_entries; i++) {
++ if (left_list[i].nodeid == api->totem_nodeid_get() &&
++ left_list[i].reason == CONFCHG_CPG_REASON_LEAVE) {
++ qb_list_for_each(iter, &cpg_pd_list_head) {
++ struct cpg_pd *cpd = qb_list_entry (iter, struct cpg_pd, list);
++ if (left_list[i].pid == cpd->pid &&
++ mar_name_compare (&cpd->group_name, group_name) == 0) {
++ cpd->pid = 0;
++ memset (&cpd->group_name, 0, sizeof(cpd->group_name));
++ cpd->cpd_state = CPD_STATE_UNJOINED;
++ }
++ }
+ }
+ }
+ }
+@@ -966,6 +994,7 @@ static void joinlist_inform_clients (void)
+ free(jld);
+ }
+ qb_map_iter_free(miter);
++ qb_map_destroy(group_notify_map);
+
+ joinlist_remove_zombie_pi_entries ();
+ }
diff --git a/debian/patches/cpg-Move-filling-of-member_list-to-subfunction.patch b/debian/patches/cpg-Move-filling-of-member_list-to-subfunction.patch
new file mode 100644
index 00000000..9ec65353
--- /dev/null
+++ b/debian/patches/cpg-Move-filling-of-member_list-to-subfunction.patch
@@ -0,0 +1,130 @@
+From: Jan Friesse <jfriesse@redhat.com>
+Date: Thu, 16 May 2019 14:08:25 +0200
+Subject: cpg: Move filling of member_list to subfunction
+
+Signed-off-by: Jan Friesse <jfriesse@redhat.com>
+(cherry picked from commit 0c1de94461368b4a924b516b77691e6ec471dcb0)
+---
+ exec/cpg.c | 86 ++++++++++++++++++++++++++++++++++++--------------------------
+ 1 file changed, 50 insertions(+), 36 deletions(-)
+
+diff --git a/exec/cpg.c b/exec/cpg.c
+index 2ecdc6b..98a16a6 100644
+--- a/exec/cpg.c
++++ b/exec/cpg.c
+@@ -652,26 +652,27 @@ static int notify_lib_totem_membership (
+ return CS_OK;
+ }
+
+-static int notify_lib_joinlist(
++/*
++ * Helper function for notify_lib_joinlist which prepares member_list using
++ * process_info_list with removed left_list items.
++ * member_list_entries - When not NULL it contains number of member_list entries
++ * member_list - When not NULL it is used as pointer to start of preallocated
++ * array of members. Pointer is adjusted to the end of array on
++ * exit.
++ */
++static void notify_lib_joinlist_fill_member_list(
+ const mar_cpg_name_t *group_name,
+- int joined_list_entries,
+- mar_cpg_address_t *joined_list,
+ int left_list_entries,
+- mar_cpg_address_t *left_list,
+- int id)
++ const mar_cpg_address_t *left_list,
++ int *member_list_entries,
++ mar_cpg_address_t **member_list)
+ {
+- int size;
+- char *buf;
+ struct qb_list_head *iter;
+- int member_list_entries;
+- struct res_lib_cpg_confchg_callback *res;
+- mar_cpg_address_t *retgi;
+ int i;
+
+- /*
+- * Find size of member_list (use process_info_list but remove items in left_list)
+- */
+- member_list_entries = 0;
++ if (member_list_entries != NULL) {
++ *member_list_entries = 0;
++ }
+
+ qb_list_for_each(iter, &process_info_list_head) {
+ struct process_info *pi = qb_list_entry (iter, struct process_info, list);
+@@ -687,10 +688,42 @@ static int notify_lib_joinlist(
+ }
+
+ if (!in_left_list) {
+- member_list_entries++;
++ if (member_list_entries != NULL) {
++ (*member_list_entries)++;
++ }
++
++ if (member_list != NULL) {
++ (*member_list)->nodeid = pi->nodeid;
++ (*member_list)->pid = pi->pid;
++ (*member_list)->reason = CPG_REASON_UNDEFINED;
++ (*member_list)++;
++ }
+ }
+ }
+ }
++}
++
++static int notify_lib_joinlist(
++ const mar_cpg_name_t *group_name,
++ int joined_list_entries,
++ mar_cpg_address_t *joined_list,
++ int left_list_entries,
++ mar_cpg_address_t *left_list,
++ int id)
++{
++ int size;
++ char *buf;
++ struct qb_list_head *iter;
++ int member_list_entries;
++ struct res_lib_cpg_confchg_callback *res;
++ mar_cpg_address_t *retgi;
++ int i;
++
++ /*
++ * Find size of member_list (use process_info_list but remove items in left_list)
++ */
++ notify_lib_joinlist_fill_member_list(group_name, left_list_entries, left_list,
++ &member_list_entries, NULL);
+
+ size = sizeof(struct res_lib_cpg_confchg_callback) +
+ sizeof(mar_cpg_address_t) * (member_list_entries + left_list_entries + joined_list_entries);
+@@ -711,27 +744,8 @@ static int notify_lib_joinlist(
+ /*
+ * Fill res->memberlist. Use process_info_list but remove items in left_list.
+ */
+- qb_list_for_each(iter, &process_info_list_head) {
+- struct process_info *pi = qb_list_entry (iter, struct process_info, list);
+-
+- if (mar_name_compare (&pi->group, group_name) == 0) {
+- int in_left_list = 0;
+-
+- for (i = 0; i < left_list_entries; i++) {
+- if (left_list[i].nodeid == pi->nodeid && left_list[i].pid == pi->pid) {
+- in_left_list = 1;
+- break ;
+- }
+- }
+-
+- if (!in_left_list) {
+- retgi->nodeid = pi->nodeid;
+- retgi->pid = pi->pid;
+- retgi->reason = CPG_REASON_UNDEFINED;
+- retgi++;
+- }
+- }
+- }
++ notify_lib_joinlist_fill_member_list(group_name, left_list_entries, left_list,
++ NULL, &retgi);
+
+ /*
+ * Fill res->left_list
diff --git a/debian/patches/cpg-notify_lib_joinlist-drop-conn-parameter.patch b/debian/patches/cpg-notify_lib_joinlist-drop-conn-parameter.patch
new file mode 100644
index 00000000..e1742bf9
--- /dev/null
+++ b/debian/patches/cpg-notify_lib_joinlist-drop-conn-parameter.patch
@@ -0,0 +1,112 @@
+From: =?utf-8?q?Fabian_Gr=C3=BCnbichler?= <f.gruenbichler@proxmox.com>
+Date: Wed, 15 May 2019 13:45:13 +0200
+Subject: cpg: notify_lib_joinlist: drop conn parameter
+
+since it is always set to NULL.
+
+(cherry picked from commit d5e9723695b2ae63162b238300013d785e875ea7)
+---
+ exec/cpg.c | 54 ++++++++++++++++++++++++------------------------------
+ 1 file changed, 24 insertions(+), 30 deletions(-)
+
+diff --git a/exec/cpg.c b/exec/cpg.c
+index e39ca34..b752cc1 100644
+--- a/exec/cpg.c
++++ b/exec/cpg.c
+@@ -647,7 +647,6 @@ static int notify_lib_totem_membership (
+
+ static int notify_lib_joinlist(
+ const mar_cpg_name_t *group_name,
+- void *conn,
+ int joined_list_entries,
+ mar_cpg_address_t *joined_list,
+ int left_list_entries,
+@@ -728,40 +727,35 @@ static int notify_lib_joinlist(
+ retgi += joined_list_entries;
+ }
+
+- if (conn) {
+- api->ipc_dispatch_send (conn, buf, size);
+- } else {
+ qb_list_for_each(iter, &cpg_pd_list_head) {
+- struct cpg_pd *cpd = qb_list_entry (iter, struct cpg_pd, list);
+- if (mar_name_compare (&cpd->group_name, group_name) == 0) {
+- assert (joined_list_entries <= 1);
+- if (joined_list_entries) {
+- if (joined_list[0].pid == cpd->pid &&
+- joined_list[0].nodeid == api->totem_nodeid_get()) {
+- cpd->cpd_state = CPD_STATE_JOIN_COMPLETED;
+- }
++ struct cpg_pd *cpd = qb_list_entry (iter, struct cpg_pd, list);
++ if (mar_name_compare (&cpd->group_name, group_name) == 0) {
++ assert (joined_list_entries <= 1);
++ if (joined_list_entries) {
++ if (joined_list[0].pid == cpd->pid &&
++ joined_list[0].nodeid == api->totem_nodeid_get()) {
++ cpd->cpd_state = CPD_STATE_JOIN_COMPLETED;
+ }
+- if (cpd->cpd_state == CPD_STATE_JOIN_COMPLETED ||
+- cpd->cpd_state == CPD_STATE_LEAVE_STARTED) {
++ }
++ if (cpd->cpd_state == CPD_STATE_JOIN_COMPLETED ||
++ cpd->cpd_state == CPD_STATE_LEAVE_STARTED) {
+
+- api->ipc_dispatch_send (cpd->conn, buf, size);
+- cpd->transition_counter++;
+- }
+- if (left_list_entries) {
+- if (left_list[0].pid == cpd->pid &&
+- left_list[0].nodeid == api->totem_nodeid_get() &&
+- left_list[0].reason == CONFCHG_CPG_REASON_LEAVE) {
+-
+- cpd->pid = 0;
+- memset (&cpd->group_name, 0, sizeof(cpd->group_name));
+- cpd->cpd_state = CPD_STATE_UNJOINED;
+- }
++ api->ipc_dispatch_send (cpd->conn, buf, size);
++ cpd->transition_counter++;
++ }
++ if (left_list_entries) {
++ if (left_list[0].pid == cpd->pid &&
++ left_list[0].nodeid == api->totem_nodeid_get() &&
++ left_list[0].reason == CONFCHG_CPG_REASON_LEAVE) {
++
++ cpd->pid = 0;
++ memset (&cpd->group_name, 0, sizeof(cpd->group_name));
++ cpd->cpd_state = CPD_STATE_UNJOINED;
+ }
+ }
+ }
+ }
+
+-
+ /*
+ * Traverse thru cpds and send totem membership for cpd, where it is not send yet
+ */
+@@ -858,7 +852,7 @@ static void downlist_inform_clients (void)
+ }
+
+ /* send confchg event */
+- notify_lib_joinlist(&group, NULL,
++ notify_lib_joinlist(&group,
+ 0, NULL,
+ pcd->left_list_entries,
+ pcd->left_list,
+@@ -1157,7 +1151,7 @@ static void do_proc_join(
+ notify_info.nodeid = nodeid;
+ notify_info.reason = reason;
+
+- notify_lib_joinlist(&pi->group, NULL,
++ notify_lib_joinlist(&pi->group,
+ 1, &notify_info,
+ 0, NULL,
+ MESSAGE_RES_CPG_CONFCHG_CALLBACK);
+@@ -1177,7 +1171,7 @@ static void do_proc_leave(
+ notify_info.nodeid = nodeid;
+ notify_info.reason = reason;
+
+- notify_lib_joinlist(name, NULL,
++ notify_lib_joinlist(name,
+ 0, NULL,
+ 1, &notify_info,
+ MESSAGE_RES_CPG_CONFCHG_CALLBACK);
diff --git a/debian/patches/cpg-send-single-confchg-event-per-group-on-joinlist.patch b/debian/patches/cpg-send-single-confchg-event-per-group-on-joinlist.patch
new file mode 100644
index 00000000..013baaa0
--- /dev/null
+++ b/debian/patches/cpg-send-single-confchg-event-per-group-on-joinlist.patch
@@ -0,0 +1,199 @@
+From: =?utf-8?q?Fabian_Gr=C3=BCnbichler?= <f.gruenbichler@proxmox.com>
+Date: Wed, 8 May 2019 16:31:15 +0200
+Subject: cpg: send single confchg event per group on joinlist
+MIME-Version: 1.0
+Content-Type: text/plain; charset="utf-8"
+Content-Transfer-Encoding: 8bit
+
+using a similar approach to
+
+43bead364514e8ae2ba00bcf07c460e31d0b1765 "Send one confchg event per CPG group to CPG client"
+
+which did the same for leave events on a network partition.
+
+Fixes: #351
+
+Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
+(cherry picked from commit 9c60289b831ef0b138142c3fc39c9a9da8a2ada2)
+---
+ exec/cpg.c | 97 ++++++++++++++++++++++++++++++++++++++++++++++----------------
+ 1 file changed, 73 insertions(+), 24 deletions(-)
+
+diff --git a/exec/cpg.c b/exec/cpg.c
+index b752cc1..e04ba57 100644
+--- a/exec/cpg.c
++++ b/exec/cpg.c
+@@ -194,6 +194,12 @@ struct join_list_entry {
+ mar_cpg_name_t group_name;
+ };
+
++struct join_list_confchg_data {
++ mar_cpg_name_t cpg_group;
++ mar_cpg_address_t join_list[CPG_MEMBERS_MAX];
++ int join_list_entries;
++};
++
+ /*
+ * Service Interfaces required by service_message_handler struct
+ */
+@@ -312,7 +318,8 @@ static void do_proc_join(
+ const mar_cpg_name_t *name,
+ uint32_t pid,
+ unsigned int nodeid,
+- int reason);
++ int reason,
++ qb_map_t *group_notify_map);
+
+ static void do_proc_leave(
+ const mar_cpg_name_t *name,
+@@ -723,35 +730,46 @@ static int notify_lib_joinlist(
+ }
+
+ if (joined_list_entries) {
++ int i;
++
+ memcpy (retgi, joined_list, joined_list_entries * sizeof(mar_cpg_address_t));
+ retgi += joined_list_entries;
++
++ for (i=0; i < joined_list_entries; i++) {
++ if (joined_list[i].nodeid == api->totem_nodeid_get()) {
++ qb_list_for_each(iter, &cpg_pd_list_head) {
++ struct cpg_pd *cpd = qb_list_entry (iter, struct cpg_pd, list);
++ if (mar_name_compare (&cpd->group_name, group_name) == 0 &&
++ joined_list[i].pid == cpd->pid) {
++ cpd->cpd_state = CPD_STATE_JOIN_COMPLETED;
++ }
++ }
++ }
++ }
+ }
+
+ qb_list_for_each(iter, &cpg_pd_list_head) {
+ struct cpg_pd *cpd = qb_list_entry (iter, struct cpg_pd, list);
+ if (mar_name_compare (&cpd->group_name, group_name) == 0) {
+- assert (joined_list_entries <= 1);
+- if (joined_list_entries) {
+- if (joined_list[0].pid == cpd->pid &&
+- joined_list[0].nodeid == api->totem_nodeid_get()) {
+- cpd->cpd_state = CPD_STATE_JOIN_COMPLETED;
+- }
+- }
+ if (cpd->cpd_state == CPD_STATE_JOIN_COMPLETED ||
+ cpd->cpd_state == CPD_STATE_LEAVE_STARTED) {
+
+ api->ipc_dispatch_send (cpd->conn, buf, size);
+ cpd->transition_counter++;
+ }
+- if (left_list_entries) {
+- if (left_list[0].pid == cpd->pid &&
+- left_list[0].nodeid == api->totem_nodeid_get() &&
+- left_list[0].reason == CONFCHG_CPG_REASON_LEAVE) {
+-
+- cpd->pid = 0;
+- memset (&cpd->group_name, 0, sizeof(cpd->group_name));
+- cpd->cpd_state = CPD_STATE_UNJOINED;
+- }
++ }
++ }
++
++ if (left_list_entries &&
++ left_list[0].nodeid == api->totem_nodeid_get() &&
++ left_list[0].reason == CONFCHG_CPG_REASON_LEAVE) {
++ qb_list_for_each(iter, &cpg_pd_list_head) {
++ struct cpg_pd *cpd = qb_list_entry (iter, struct cpg_pd, list);
++ if (mar_name_compare (&cpd->group_name, group_name) == 0 &&
++ left_list[0].pid == cpd->pid) {
++ cpd->pid = 0;
++ memset (&cpd->group_name, 0, sizeof(cpd->group_name));
++ cpd->cpd_state = CPD_STATE_UNJOINED;
+ }
+ }
+ }
+@@ -915,6 +933,11 @@ static void joinlist_inform_clients (void)
+ struct joinlist_msg *stored_msg;
+ struct qb_list_head *iter;
+ unsigned int i;
++ qb_map_t *group_notify_map;
++ qb_map_iter_t *miter;
++ struct join_list_confchg_data *jld;
++
++ group_notify_map = qb_skiplist_create();
+
+ i = 0;
+ qb_list_for_each(iter, &joinlist_messages_head) {
+@@ -931,9 +954,19 @@ static void joinlist_inform_clients (void)
+ }
+
+ do_proc_join (&stored_msg->group_name, stored_msg->pid, stored_msg->sender_nodeid,
+- CONFCHG_CPG_REASON_NODEUP);
++ CONFCHG_CPG_REASON_NODEUP, group_notify_map);
+ }
+
++ miter = qb_map_iter_create(group_notify_map);
++ while (qb_map_iter_next(miter, (void **)&jld)) {
++ notify_lib_joinlist(&jld->cpg_group,
++ jld->join_list_entries, jld->join_list,
++ 0, NULL,
++ MESSAGE_RES_CPG_CONFCHG_CALLBACK);
++ free(jld);
++ }
++ qb_map_iter_free(miter);
++
+ joinlist_remove_zombie_pi_entries ();
+ }
+
+@@ -1111,13 +1144,15 @@ static void do_proc_join(
+ const mar_cpg_name_t *name,
+ uint32_t pid,
+ unsigned int nodeid,
+- int reason)
++ int reason,
++ qb_map_t *group_notify_map)
+ {
+ struct process_info *pi;
+ struct process_info *pi_entry;
+ mar_cpg_address_t notify_info;
+ struct qb_list_head *list;
+ struct qb_list_head *list_to_add = NULL;
++ int size;
+
+ if (process_info_find (name, pid, nodeid) != NULL) {
+ return ;
+@@ -1151,10 +1186,24 @@ static void do_proc_join(
+ notify_info.nodeid = nodeid;
+ notify_info.reason = reason;
+
+- notify_lib_joinlist(&pi->group,
+- 1, &notify_info,
+- 0, NULL,
+- MESSAGE_RES_CPG_CONFCHG_CALLBACK);
++ if (group_notify_map == NULL) {
++ notify_lib_joinlist(&pi->group,
++ 1, &notify_info,
++ 0, NULL,
++ MESSAGE_RES_CPG_CONFCHG_CALLBACK);
++ } else {
++ struct join_list_confchg_data *jld = qb_map_get(group_notify_map, pi->group.value);
++ if (jld == NULL) {
++ jld = (struct join_list_confchg_data *)calloc(1, sizeof(struct join_list_confchg_data));
++ memcpy(&jld->cpg_group, &pi->group, sizeof(mar_cpg_name_t));
++ qb_map_put(group_notify_map, jld->cpg_group.value, jld);
++ }
++ size = jld->join_list_entries;
++ jld->join_list[size].nodeid = notify_info.nodeid;
++ jld->join_list[size].pid = notify_info.pid;
++ jld->join_list[size].reason = notify_info.reason;
++ jld->join_list_entries++;
++ }
+ }
+
+ static void do_proc_leave(
+@@ -1219,7 +1268,7 @@ static void message_handler_req_exec_cpg_procjoin (
+
+ do_proc_join (&req_exec_cpg_procjoin->group_name,
+ req_exec_cpg_procjoin->pid, nodeid,
+- CONFCHG_CPG_REASON_JOIN);
++ CONFCHG_CPG_REASON_JOIN, NULL);
+ }
+
+ static void message_handler_req_exec_cpg_procleave (
diff --git a/debian/patches/series b/debian/patches/series
index 803038e4..fec11c03 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -52,3 +52,7 @@ vqsim-Check-length-of-copied-optarg.patch
Fix-various-typos-in-ChangeLog.patch
Enable-PrivateTmp-in-the-systemd-service-files.patch
pve__only-start-corosync.service-if-conf-exists.patch
+cpg-notify_lib_joinlist-drop-conn-parameter.patch
+cpg-send-single-confchg-event-per-group-on-joinlist.patch
+cpg-Add-more-comments-to-notify_lib_joinlist.patch
+cpg-Move-filling-of-member_list-to-subfunction.patch

View File

@ -1,57 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fabian=20Gr=C3=BCnbichler?= <f.gruenbichler@proxmox.com>
Date: Wed, 19 Jun 2019 13:50:23 +0200
Subject: [PATCH] bump version to 3.0.2
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
---
debian/patches/bump-version-to-3.0.2.patch | 27 ++++++++++++++++++++++
debian/patches/series | 1 +
2 files changed, 28 insertions(+)
create mode 100644 debian/patches/bump-version-to-3.0.2.patch
diff --git a/debian/patches/bump-version-to-3.0.2.patch b/debian/patches/bump-version-to-3.0.2.patch
new file mode 100644
index 00000000..528ef7a6
--- /dev/null
+++ b/debian/patches/bump-version-to-3.0.2.patch
@@ -0,0 +1,27 @@
+From: =?utf-8?q?Fabian_Gr=C3=BCnbichler?= <f.gruenbichler@proxmox.com>
+Date: Wed, 19 Jun 2019 13:30:39 +0200
+Subject: bump version to 3.0.2
+MIME-Version: 1.0
+Content-Type: text/plain; charset="utf-8"
+Content-Transfer-Encoding: 8bit
+
+Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
+---
+ .tarball-version | 2 +-
+ .version | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/.tarball-version b/.tarball-version
+index cb2b00e..b502146 100644
+--- a/.tarball-version
++++ b/.tarball-version
+@@ -1 +1 @@
+-3.0.1
++3.0.2
+diff --git a/.version b/.version
+index cb2b00e..b502146 100644
+--- a/.version
++++ b/.version
+@@ -1 +1 @@
+-3.0.1
++3.0.2
diff --git a/debian/patches/series b/debian/patches/series
index fec11c03..36735b84 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -56,3 +56,4 @@ cpg-notify_lib_joinlist-drop-conn-parameter.patch
cpg-send-single-confchg-event-per-group-on-joinlist.patch
cpg-Add-more-comments-to-notify_lib_joinlist.patch
cpg-Move-filling-of-member_list-to-subfunction.patch
+bump-version-to-3.0.2.patch

View File

@ -1,127 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Thomas Lamprecht <t.lamprecht@proxmox.com>
Date: Fri, 21 Jun 2019 14:19:44 +0200
Subject: [PATCH] cherry-pick totem config patches for no link0 setups
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
---
debian/patches/series | 2 +
...if-all-nodes-have-name-attrs-in-mult.patch | 48 +++++++++++++++++++
...if-all-nodes-have-same-number-of-lin.patch | 40 ++++++++++++++++
3 files changed, 90 insertions(+)
create mode 100644 debian/patches/totem-fix-check-if-all-nodes-have-name-attrs-in-mult.patch
create mode 100644 debian/patches/totem-fix-check-if-all-nodes-have-same-number-of-lin.patch
diff --git a/debian/patches/series b/debian/patches/series
index 36735b84..5c91cd38 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -57,3 +57,5 @@ cpg-send-single-confchg-event-per-group-on-joinlist.patch
cpg-Add-more-comments-to-notify_lib_joinlist.patch
cpg-Move-filling-of-member_list-to-subfunction.patch
bump-version-to-3.0.2.patch
+totem-fix-check-if-all-nodes-have-name-attrs-in-mult.patch
+totem-fix-check-if-all-nodes-have-same-number-of-lin.patch
diff --git a/debian/patches/totem-fix-check-if-all-nodes-have-name-attrs-in-mult.patch b/debian/patches/totem-fix-check-if-all-nodes-have-name-attrs-in-mult.patch
new file mode 100644
index 00000000..9a6cc3ab
--- /dev/null
+++ b/debian/patches/totem-fix-check-if-all-nodes-have-name-attrs-in-mult.patch
@@ -0,0 +1,48 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Thomas Lamprecht <t.lamprecht@proxmox.com>
+Date: Fri, 14 Jun 2019 18:31:16 +0200
+Subject: [PATCH] totem: fix check if all nodes have name attrs in multi-link
+ setups
+
+As totem_config->interfaces entries are _all_ possible links and not
+only the configured ones we cannot trust that interface[0] is
+configured at the time of checking, and thus has a valid
+member_count. So set the members variable to the member_count entry
+from an actually configured interface and loop over that one.
+
+This fixes a case where the check for the name property on all nodes
+for multi links was skipped if link 0 was not configured, as then its
+member_count was 0.
+
+Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
+Reviewed-by: Christine Caulfield <ccaulfie@redhat.com>
+Reviewed-by: Jan Friesse <jfriesse@redhat.com>
+(cherry picked from commit 7ada508a82680dcf23510e585ec295b10ac5da11)
+Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
+---
+ exec/totemconfig.c | 7 ++++---
+ 1 file changed, 4 insertions(+), 3 deletions(-)
+
+diff --git a/exec/totemconfig.c b/exec/totemconfig.c
+index d57562ae..0c2b5320 100644
+--- a/exec/totemconfig.c
++++ b/exec/totemconfig.c
+@@ -388,14 +388,15 @@ static int totem_volatile_config_validate (
+ num_configured = 0;
+ for (i = 0; i < INTERFACE_MAX; i++) {
+ if (totem_config->interfaces[i].configured) {
++ if (num_configured == 0) {
++ members = totem_config->interfaces[i].member_count;
++ }
+ num_configured++;
+ }
+ }
+
+ if (num_configured > 1) {
+- members = totem_config->interfaces[0].member_count;
+-
+- for (i=0; i<totem_config->interfaces[0].member_count; i++) {
++ for (i=0; i < members; i++) {
+ snprintf(name_key, sizeof(name_key), "nodelist.node.%d.name", i);
+
+ if (icmap_get_string(name_key, &name_str) != CS_OK) {
diff --git a/debian/patches/totem-fix-check-if-all-nodes-have-same-number-of-lin.patch b/debian/patches/totem-fix-check-if-all-nodes-have-same-number-of-lin.patch
new file mode 100644
index 00000000..2f061de5
--- /dev/null
+++ b/debian/patches/totem-fix-check-if-all-nodes-have-same-number-of-lin.patch
@@ -0,0 +1,40 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Thomas Lamprecht <t.lamprecht@proxmox.com>
+Date: Fri, 14 Jun 2019 18:56:57 +0200
+Subject: [PATCH] totem: fix check if all nodes have same number of links
+
+configured links may not come in order in the interfaces array, which
+holds an entry for _all_ possible links, not just configured ones.
+
+So iterate through all interfaces, but skip those which are not
+configured. This allows to start corosync with a configuration where
+link 0 is currently not mentioned, as else it was checked but had
+member_count = 0 from it's default initialization, which then made
+this code report a false positive for the "Not all nodes have the
+same number of links" check even on a correct config.
+
+Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
+Reviewed-by: Christine Caulfield <ccaulfie@redhat.com>
+Reviewed-by: Jan Friesse <jfriesse@redhat.com>
+(cherry picked from commit 816324c94cfb917b11f43954b8757424db28b390)
+Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
+---
+ exec/totemconfig.c | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/exec/totemconfig.c b/exec/totemconfig.c
+index 0c2b5320..d2b3ed72 100644
+--- a/exec/totemconfig.c
++++ b/exec/totemconfig.c
+@@ -406,7 +406,10 @@ static int totem_volatile_config_validate (
+ }
+ }
+
+- for (i=0; i<num_configured; i++) {
++ for (i=0; i < INTERFACE_MAX; i++) {
++ if (!totem_config->interfaces[i].configured) {
++ continue;
++ }
+ if (totem_config->interfaces[i].member_count != members) {
+ snprintf (local_error_reason, sizeof(local_error_reason),
+ "Not all nodes have the same number of links");
--
2.20.1

View File

@ -1,8 +0,0 @@
0001-cherry-pick-3.0.2-as-patches.patch
0002-don-t-install-default-corosync.conf.patch
0003-remove-init-script.patch
0004-bsys-disable-augeas-tools.patch
0005-only-start-corosync.service-if-conf-exists.patch
0006-CPG-callback-merging.patch
0007-bump-version-to-3.0.2.patch
0008-cherry-pick-totem-config-patches-for-no-link0-setups.patch

1
upstream Submodule

@ -0,0 +1 @@
Subproject commit 0390200dd427d1d3e75bba8584dbfbb794b52b49