and drop those that were applied upstream.
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
1 file changed, 7 insertions(+)
diff --git a/debian/control b/debian/control
-index e105b0b2..8a2ed29e 100644
+index 8a0855ce..d5e2513a 100644
--- a/debian/control
+++ b/debian/control
-@@ -44,6 +44,11 @@ X-Common-Description: The Corosync Cluster Engine is a Group Communication
+@@ -43,6 +43,11 @@ X-Common-Description: The Corosync Cluster Engine is a Group Communication
* A quorum system that notifies applications when quorum is achieved
or lost.
+
Package: corosync
Architecture: any
- Pre-Depends: ${misc:Pre-Depends}
+ Pre-Depends:
@@ -52,6 +57,8 @@ Depends: ${shlibs:Depends},
lsb-base (>= 3.0-6),
adduser,
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fabian=20Gr=C3=BCnbichler?= <f.gruenbichler@proxmox.com>
-Date: Tue, 7 Mar 2017 13:32:02 +0100
+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
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
---
- debian/corosync.conf | 111 ----------------------------------------
- debian/corosync.install | 1 -
- 2 files changed, 112 deletions(-)
- delete mode 100644 debian/corosync.conf
+ .../Make-the-example-config-valid.patch | 64 -------------------
+ debian/corosync.install | 2 +-
+ debian/patches/series | 1 -
+ debian/rules | 3 -
+ 4 files changed, 1 insertion(+), 69 deletions(-)
+ delete mode 100644 debian/patches/Make-the-example-config-valid.patch
-diff --git a/debian/corosync.conf b/debian/corosync.conf
+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 04444322..00000000
---- a/debian/corosync.conf
+index 5c2182f7..00000000
+--- a/debian/patches/Make-the-example-config-valid.patch
+++ /dev/null
-@@ -1,111 +0,0 @@
--# Please read the corosync.conf.5 manual page
--totem {
-- version: 2
+@@ -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
-
-- # Corosync itself works without a cluster name, but DLM needs one.
-- # The cluster name is also written into the VG metadata of newly
-- # created shared LVM volume groups, if lvmlockd uses DLM locking.
-- # It is also used for computing mcastaddr, unless overridden below.
-- cluster_name: debian
+----
+- conf/corosync.conf.example | 22 +++++++---------------
+- 1 file changed, 7 insertions(+), 15 deletions(-)
-
-- # How long before declaring a token lost (ms)
-- token: 3000
--
-- # How many token retransmits before forming a new configuration
-- token_retransmits_before_loss_const: 10
--
-- # Limit generated nodeids to 31-bits (positive signed integers)
-- clear_node_high_bit: yes
--
-- # crypto_cipher and crypto_hash: Used for mutual node authentication.
-- # If you choose to enable this, then do remember to create a shared
-- # secret with "corosync-keygen".
-- # enabling crypto_cipher, requires also enabling of crypto_hash.
-- # crypto_cipher and crypto_hash should be used instead of deprecated
-- # secauth parameter.
--
-- # Valid values for crypto_cipher are none (no encryption), aes256, aes192,
-- # aes128 and 3des. Enabling crypto_cipher, requires also enabling of
-- # crypto_hash.
-- crypto_cipher: none
--
-- # Valid values for crypto_hash are none (no authentication), md5, sha1,
-- # sha256, sha384 and sha512.
-- crypto_hash: none
--
-- # Optionally assign a fixed node id (integer)
-- # nodeid: 1234
--
-- # interface: define at least one interface to communicate
-- # over. If you define more than one interface stanza, you must
-- # also set rrp_mode.
-- interface {
-- # Rings must be consecutively numbered, starting at 0.
-- ringnumber: 0
-- # This is normally the *network* address of the
-- # interface to bind to. This ensures that you can use
-- # identical instances of this configuration file
-- # across all your cluster nodes, without having to
-- # modify this option.
-- bindnetaddr: 127.0.0.1
-- # However, if you have multiple physical network
-- # interfaces configured for the same subnet, then the
-- # network address alone is not sufficient to identify
-- # the interface Corosync should bind to. In that case,
-- # configure the *host* address of the interface
-- # instead:
-- # bindnetaddr: 192.168.1.1
-- # When selecting a multicast address, consider RFC
-- # 2365 (which, among other things, specifies that
-- # 239.255.x.x addresses are left to the discretion of
-- # the network administrator). Do not reuse multicast
-- # addresses across multiple Corosync clusters sharing
-- # the same network.
-- # mcastaddr: 239.255.1.1
-- # Corosync uses the port you specify here for UDP
-- # messaging, and also the immediately preceding
-- # port. Thus if you set this to 5405, Corosync sends
-- # messages over UDP ports 5405 and 5404.
-- mcastport: 5405
-- # Time-to-live for cluster communication packets. The
-- # number of hops (routers) that this ring will allow
-- # itself to pass. Note that multicast routing must be
-- # specifically enabled on most network routers.
-- ttl: 1
-- }
--}
--
--logging {
-- # Log the source file and line where messages are being
-- # generated. When in doubt, leave off. Potentially useful for
-- # debugging.
-- fileline: off
-- # Log to standard error. When in doubt, set to no. Useful when
-- # running in the foreground (when invoking "corosync -f")
-- to_stderr: no
-- # Log to a log file. When set to "no", the "logfile" option
-- # must not be set.
-- to_logfile: no
-- #logfile: /var/log/corosync/corosync.log
-- # Log to the system log daemon. When in doubt, set to yes.
-- to_syslog: yes
-- # Log with syslog facility daemon.
-- syslog_facility: daemon
-- # Log debug messages (very verbose). When in doubt, leave off.
-- debug: off
-- # Log messages with time stamps. When in doubt, set to on
-- # (unless you are only logging to syslog, where double
-- # timestamps can be annoying).
-- timestamp: on
-- logger_subsys {
-- subsys: QUORUM
-- debug: off
-- }
--}
--
--quorum {
-- # Enable and configure quorum subsystem (default: off)
-- # see also corosync.conf.5 and votequorum.5
-- provider: corosync_votequorum
-- expected_votes: 2
--}
+-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 027a58db..f38d1f78 100755
+index bfaca759..c5b92661 100644
--- a/debian/corosync.install
+++ b/debian/corosync.install
-@@ -30,6 +30,5 @@ usr/share/augeas/lenses/corosync.aug
+@@ -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.*example* usr/share/doc/corosync/examples
+-etc/corosync/corosync.conf
++etc/corosync/corosync.*example* usr/share/doc/corosync/examples
etc/corosync/uidgid.d
--debian/corosync.conf etc/corosync
usr/share/corosync/xml2conf.xsl
var/lib/corosync
+diff --git a/debian/patches/series b/debian/patches/series
+index 6b552ce1..41866b14 100644
+--- a/debian/patches/series
++++ b/debian/patches/series
+@@ -1,6 +1,5 @@
+ Fix-various-typos-in-ChangeLog.patch
+ Enable-PrivateTmp-in-the-systemd-service-files.patch
+-Make-the-example-config-valid.patch
+ corosync.conf.5-fix-grammar.patch
+ corosync.conf.5-typography-fixes.patch
+ AC_PROG_SED-is-already-present.patch
+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
+++ /dev/null
-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 12:36:41 +0200
-Subject: [PATCH] Revert "Switch to Debhelper compat level 11"
-
-This reverts commit e11ae7f2f329dab7acf6cb0d70980494a81ad1b2.
----
- debian/compat | 2 +-
- debian/control | 4 +++-
- debian/rules | 12 ++++++------
- 3 files changed, 10 insertions(+), 8 deletions(-)
-
-diff --git a/debian/compat b/debian/compat
-index b4de3947..ec635144 100644
---- a/debian/compat
-+++ b/debian/compat
-@@ -1 +1 @@
--11
-+9
-diff --git a/debian/control b/debian/control
-index 8a2ed29e..888bc650 100644
---- a/debian/control
-+++ b/debian/control
-@@ -8,9 +8,11 @@ Uploaders:
- Standards-Version: 4.1.4
- Build-Depends:
- augeas-tools,
-- debhelper (>= 11~),
-+ debhelper (>= 9~),
- dctrl-tools,
-+ dh-autoreconf,
- dh-exec,
-+ dh-systemd,
- groff,
- libdbus-1-dev,
- libnss3-dev,
-diff --git a/debian/rules b/debian/rules
-index 7108d92c..d863e8e8 100755
---- a/debian/rules
-+++ b/debian/rules
-@@ -28,7 +28,7 @@ initscript-dir=etc/init.d
- endif
-
- %:
-- dh $@
-+ dh $@ --parallel --with autoreconf,systemd
-
- # Avoid useless dependencies in the libraries
- override_dh_autoreconf:
-@@ -71,15 +71,15 @@ override_dh_auto_install-arch:
- debian/tmp/$(initscript-dir)/corosync-qnetd \
- debian/tmp/usr/share/doc/corosync/LICENSE
-
--override_dh_missing:
-- dh_missing --fail-missing
-+override_dh_install:
-+ dh_install --fail-missing
-
- override_dh_installchangelogs:
- dh_installchangelogs ChangeLog
-
--override_dh_installsystemd:
-- dh_installsystemd -p corosync-qdevice --no-enable --no-start
-- dh_installsystemd --remaining-packages
-+override_dh_systemd_enable:
-+ dh_systemd_enable -p corosync-qdevice --no-enable
-+ dh_systemd_enable --remaining-packages
-
- override_dh_strip:
- dh_strip --dbgsym-migration=corosync-dbg
--- /dev/null
+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
+-
+-:
--- /dev/null
+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 14:08:04 +0100
+Subject: [PATCH] add corosync-pve postinst for restart on dist-upgrade
+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-pve.postinst | 12 ++++++++++++
+ 1 file changed, 12 insertions(+)
+ create mode 100755 debian/corosync-pve.postinst
+
+diff --git a/debian/corosync-pve.postinst b/debian/corosync-pve.postinst
+new file mode 100755
+index 00000000..f282563f
+--- /dev/null
++++ b/debian/corosync-pve.postinst
+@@ -0,0 +1,12 @@
++#!/bin/sh
++
++set -e
++
++if [ "$1" = "configure" ]; then
++ if [ -n "$2" ]; then
++ # switching package name from corosync-pve to corosync requires a manual restart on upgrade, once
++ if dpkg --compare-versions "$2" lt "2.4.2-pve1" ; then
++ deb-systemd-invoke try-restart corosync.service > /dev/null || true
++ fi
++ fi
++fi
+++ /dev/null
-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:12:05 +0100
-Subject: [PATCH] restart after package upgrade is complete
-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/rules | 3 +++
- 1 file changed, 3 insertions(+)
-
-diff --git a/debian/rules b/debian/rules
-index d863e8e8..366f6ac9 100755
---- a/debian/rules
-+++ b/debian/rules
-@@ -81,6 +81,9 @@ override_dh_systemd_enable:
- dh_systemd_enable -p corosync-qdevice --no-enable
- dh_systemd_enable --remaining-packages
-
-+override_dh_systemd_start:
-+ dh_systemd_start -r --restart-after-upgrade
-+
- override_dh_strip:
- dh_strip --dbgsym-migration=corosync-dbg
-
--- /dev/null
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Fabian=20Gr=C3=BCnbichler?= <f.gruenbichler@proxmox.com>
+Date: Mon, 13 Mar 2017 13:26:29 +0100
+Subject: [PATCH] add libcorosync4-pve transitional package
+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/control | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/debian/control b/debian/control
+index d5e2513a..7643c79e 100644
+--- a/debian/control
++++ b/debian/control
+@@ -48,6 +48,11 @@ Architecture: all
+ Depends: corosync (= ${binary:Version})
+ Description: Transitional package.
+
++Package: libcorosync4-pve
++Architecture: all
++Depends: corosync (= ${binary:Version})
++Description: Transitional package.
++
+ Package: corosync
+ Architecture: any
+ Pre-Depends:
+++ /dev/null
-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 | 122 -------------------------------------------
- 1 file changed, 122 deletions(-)
- delete mode 100644 debian/corosync.init
-
-diff --git a/debian/corosync.init b/debian/corosync.init
-deleted file mode 100644
-index f7b813a5..00000000
---- a/debian/corosync.init
-+++ /dev/null
-@@ -1,122 +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
--set -a
--[ -r /etc/default/corosync ] && . /etc/default/corosync
--set +a
--
--# 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
--
--:
+++ /dev/null
-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 14:08:04 +0100
-Subject: [PATCH] add corosync-pve postinst for restart on dist-upgrade
-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-pve.postinst | 12 ++++++++++++
- 1 file changed, 12 insertions(+)
- create mode 100755 debian/corosync-pve.postinst
-
-diff --git a/debian/corosync-pve.postinst b/debian/corosync-pve.postinst
-new file mode 100755
-index 00000000..f282563f
---- /dev/null
-+++ b/debian/corosync-pve.postinst
-@@ -0,0 +1,12 @@
-+#!/bin/sh
-+
-+set -e
-+
-+if [ "$1" = "configure" ]; then
-+ if [ -n "$2" ]; then
-+ # switching package name from corosync-pve to corosync requires a manual restart on upgrade, once
-+ if dpkg --compare-versions "$2" lt "2.4.2-pve1" ; then
-+ deb-systemd-invoke try-restart corosync.service > /dev/null || true
-+ fi
-+ fi
-+fi
--- /dev/null
+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 | 28 +++++++++++++++++++
+ debian/patches/series | 1 +
+ 2 files changed, 29 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..18afb84e
+--- /dev/null
++++ b/debian/patches/pve__only-start-corosync.service-if-conf-exists.patch
+@@ -0,0 +1,28 @@
++From 306692e2627b0fe072bfae21ddb5d501189c57c5 Mon Sep 17 00:00:00 2001
++From: =?UTF-8?q?Fabian=20Gr=C3=BCnbichler?= <f.gruenbichler@proxmox.com>
++Date: Mon, 13 Mar 2017 13:27:49 +0100
++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>
++---
++ init/corosync.service.in | 1 +
++ 1 file changed, 1 insertion(+)
++
++diff --git a/init/corosync.service.in b/init/corosync.service.in
++index 7733a98c..1b65c94b 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
++
++--
++2.19.1
++
+diff --git a/debian/patches/series b/debian/patches/series
+index 41866b14..fcba2944 100644
+--- a/debian/patches/series
++++ b/debian/patches/series
+@@ -5,3 +5,4 @@ corosync.conf.5-typography-fixes.patch
+ AC_PROG_SED-is-already-present.patch
+ Use-the-SED-variable-provided-by-configure.patch
+ Use-the-AWK-variable-provided-by-configure.patch
++pve__only-start-corosync.service-if-conf-exists.patch
+++ /dev/null
-From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Fabian=20Gr=C3=BCnbichler?= <f.gruenbichler@proxmox.com>
-Date: Mon, 13 Mar 2017 13:26:29 +0100
-Subject: [PATCH] add libcorosync4-pve transitional package
-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/control | 5 +++++
- 1 file changed, 5 insertions(+)
-
-diff --git a/debian/control b/debian/control
-index 888bc650..b4063466 100644
---- a/debian/control
-+++ b/debian/control
-@@ -51,6 +51,11 @@ Architecture: all
- Depends: corosync (= ${binary:Version})
- Description: Transitional package.
-
-+Package: libcorosync4-pve
-+Architecture: all
-+Depends: corosync (= ${binary:Version})
-+Description: Transitional package.
-+
- Package: corosync
- Architecture: any
- Pre-Depends: ${misc:Pre-Depends}
--- /dev/null
+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 7643c79e..c3e1608b 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) \
+++ /dev/null
-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
-
----
- ...tart-corosync.service-if-conf-exists.patch | 28 +++++++++++++++++++
- debian/patches/series | 1 +
- 2 files changed, 29 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..18afb84e
---- /dev/null
-+++ b/debian/patches/pve__only-start-corosync.service-if-conf-exists.patch
-@@ -0,0 +1,28 @@
-+From 306692e2627b0fe072bfae21ddb5d501189c57c5 Mon Sep 17 00:00:00 2001
-+From: =?UTF-8?q?Fabian=20Gr=C3=BCnbichler?= <f.gruenbichler@proxmox.com>
-+Date: Mon, 13 Mar 2017 13:27:49 +0100
-+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>
-+---
-+ init/corosync.service.in | 1 +
-+ 1 file changed, 1 insertion(+)
-+
-+diff --git a/init/corosync.service.in b/init/corosync.service.in
-+index 7733a98c..1b65c94b 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
-+
-+--
-+2.19.1
-+
-diff --git a/debian/patches/series b/debian/patches/series
-index de0e277d..78b44c78 100644
---- a/debian/patches/series
-+++ b/debian/patches/series
-@@ -16,3 +16,4 @@ Fix-typo-sucesfully-successfully.patch
- qnetd-stay-with-the-DBM-NSS-DB-format.patch
- Fix-typo-defualt-default.patch
- Please-make-the-manpages-reproducible.patch
-+pve__only-start-corosync.service-if-conf-exists.patch
+++ /dev/null
-From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
-From: Thomas Lamprecht <t.lamprecht@proxmox.com>
-Date: Wed, 29 Mar 2017 09:35:19 +0200
-Subject: [PATCH] remove unecessary and problematic corosync-qdevice.init
-
-Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
----
- debian/corosync-qdevice.init | 55 ------------------------------------
- 1 file changed, 55 deletions(-)
- delete mode 100755 debian/corosync-qdevice.init
-
-diff --git a/debian/corosync-qdevice.init b/debian/corosync-qdevice.init
-deleted file mode 100755
-index 344666ad..00000000
---- a/debian/corosync-qdevice.init
-+++ /dev/null
-@@ -1,55 +0,0 @@
--#!/bin/sh
--# kFreeBSD do not accept scripts as interpreters, using #!/bin/sh and sourcing.
--if [ true != "$INIT_D_SCRIPT_SOURCED" ] ; then
-- set "$0" "$@"; INIT_D_SCRIPT_SOURCED=true . /lib/init/init-d-script
--fi
--### BEGIN INIT INFO
--# Provides: corosync-qdevice
--# Required-Start: $remote_fs $syslog corosync
--# Required-Stop: $remote_fs $syslog corosync
--# Default-Start:
--# Default-Stop: 0 1 6
--# Short-Description: Corosync Qdevice daemon
--# Description: Starts and stops Corosync Qdevice daemon.
--### END INIT INFO
--
--NAME="corosync-qdevice"
--DESC="Corosync Qdevice daemon"
--DAEMON="/usr/sbin/$NAME"
--PIDFILE="/run/$NAME/$NAME.pid"
--
--CONFIG="/etc/default/$NAME"
--[ -f "$CONFIG" ] && . "$CONFIG"
--
--DAEMON_ARGS="$COROSYNC_QDEVICE_OPTIONS"
--
--do_start_prepare() {
-- if grep -q nocluster /proc/cmdline; then
-- log_failure_msg "not configured to run at boot"
-- exit 1
-- fi
--}
--
--# do_{start,stop}_cmd from init-d-script, but without the --name option.
--# corosync-qdevice is too long for a process name, it gets truncated,
--# which makes it incompatible with the --name option. See #843419.
--do_start_cmd() {
-- start-stop-daemon --start --quiet ${PIDFILE:+--pidfile ${PIDFILE}} \
-- $START_ARGS \
-- --startas $DAEMON --exec $DAEMON --test > /dev/null \
-- || return 1
-- start-stop-daemon --start --quiet ${PIDFILE:+--pidfile ${PIDFILE}} \
-- $START_ARGS \
-- --startas $DAEMON --exec $DAEMON -- $DAEMON_ARGS \
-- || return 2
--}
--do_stop_cmd() {
-- start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 \
-- $STOP_ARGS \
-- ${PIDFILE:+--pidfile ${PIDFILE}} --exec $DAEMON
-- RETVAL="$?"
-- [ "$RETVAL" = 2 ] && return 2
-- # Many daemons don't delete their pidfiles when they exit.
-- rm -f $PIDFILE
-- return $RETVAL
--}
+++ /dev/null
-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:11:47 +0200
-Subject: [PATCH] cpg: Inform clients about left nodes during pause
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Patch tries to fix incorrect behaviour during following test-case:
-- 3 nodes
-- Node 1 is paused
-- Node 2 and 3 detects node 1 as failed and informs CPG clients
-- Node 1 is unpaused
-- Node 1 clients are informed about new membership, but not about Node 1
- being paused, so from Node 1 point-of-view, Node 2 and 3 failure
-
-Solution is to:
-- Remove downlist master choose and always choose local node downlist.
- For Node 1 in example above, downlist contains Node 2 and 3.
-- Keep code which informs clients about left nodes
-- Use joinlist as a authoritative source of nodes/clients which exists
- in membership
-
-This patch doesn't break backwards compatibility.
-
-I've walked thru all the patches which changed behavior of cpg to ensure
-patch does not break CPG behavior. Most important were:
-- 058f50314cd20abe67f5e8fb3c029a63b0e10cdc - Base. Code was significantly
- changed to handle double free by split group_info into two structures
- cpg_pd (local node clients) and process_info (all clients). Joinlist
- was
-- 97c28ea756cdf59316b2f609103122cc678329bd - This patch removed
- confchg_fn and made CPG sync correct
-- feff0e8542463773207a3b2c1f6004afba1f58d5 - I've tested described
- behavior without any issues
-- 6bbbfcb6b4af72cf35ab9fdb4412fa6c6bdacc12 - Added idea of using
- heuristics to choose same downlist on all nodes. Sadly this idea
- was beginning of the problems described in
- 040fda8872a4a20340d73fa1c240b86afb2489f8,
- ac1d79ea7c14997353427e962865781d0836d9fa,
- 559d4083ed8355fe83f275e53b9c8f52a91694b2,
- 02c5dffa5bb8579c223006fa1587de9ba7409a3d,
- 64d0e5ace025cc929e42896c5d6beb3ef75b8244 and
- b55f32fe2e1538db33a1ec584b67744c724328c6
-- 02c5dffa5bb8579c223006fa1587de9ba7409a3d - Made joinlist as
- authoritative source of nodes/clients but left downlist_master_choose
- as a source of information about left nodes
-
-Long story made short. This patch basically reverts
-idea of using heuristics to choose same downlist on all nodes.
-
-Signed-off-by: Jan Friesse <jfriesse@redhat.com>
-Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
-Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
----
- ...lients-about-left-nodes-during-pause.patch | 326 ++++++++++++++++++
- debian/patches/series | 1 +
- 2 files changed, 327 insertions(+)
- create mode 100644 debian/patches/pve__cpg-Inform-clients-about-left-nodes-during-pause.patch
-
-diff --git a/debian/patches/pve__cpg-Inform-clients-about-left-nodes-during-pause.patch b/debian/patches/pve__cpg-Inform-clients-about-left-nodes-during-pause.patch
-new file mode 100644
-index 00000000..a8c9a50c
---- /dev/null
-+++ b/debian/patches/pve__cpg-Inform-clients-about-left-nodes-during-pause.patch
-@@ -0,0 +1,326 @@
-+From 60b7c9ebfca5cc55c2cb222264a36e597ec5a29f Mon Sep 17 00:00:00 2001
-+From: Jan Friesse <jfriesse@redhat.com>
-+Date: Tue, 24 Apr 2018 17:44:48 +0200
-+Subject: [PATCH] cpg: Inform clients about left nodes during pause
-+MIME-Version: 1.0
-+Content-Type: text/plain; charset=UTF-8
-+Content-Transfer-Encoding: 8bit
-+
-+Patch tries to fix incorrect behaviour during following test-case:
-+- 3 nodes
-+- Node 1 is paused
-+- Node 2 and 3 detects node 1 as failed and informs CPG clients
-+- Node 1 is unpaused
-+- Node 1 clients are informed about new membership, but not about Node 1
-+ being paused, so from Node 1 point-of-view, Node 2 and 3 failure
-+
-+Solution is to:
-+- Remove downlist master choose and always choose local node downlist.
-+ For Node 1 in example above, downlist contains Node 2 and 3.
-+- Keep code which informs clients about left nodes
-+- Use joinlist as a authoritative source of nodes/clients which exists
-+ in membership
-+
-+This patch doesn't break backwards compatibility.
-+
-+I've walked thru all the patches which changed behavior of cpg to ensure
-+patch does not break CPG behavior. Most important were:
-+- 058f50314cd20abe67f5e8fb3c029a63b0e10cdc - Base. Code was significantly
-+ changed to handle double free by split group_info into two structures
-+ cpg_pd (local node clients) and process_info (all clients). Joinlist
-+ was
-+- 97c28ea756cdf59316b2f609103122cc678329bd - This patch removed
-+ confchg_fn and made CPG sync correct
-+- feff0e8542463773207a3b2c1f6004afba1f58d5 - I've tested described
-+ behavior without any issues
-+- 6bbbfcb6b4af72cf35ab9fdb4412fa6c6bdacc12 - Added idea of using
-+ heuristics to choose same downlist on all nodes. Sadly this idea
-+ was beginning of the problems described in
-+ 040fda8872a4a20340d73fa1c240b86afb2489f8,
-+ ac1d79ea7c14997353427e962865781d0836d9fa,
-+ 559d4083ed8355fe83f275e53b9c8f52a91694b2,
-+ 02c5dffa5bb8579c223006fa1587de9ba7409a3d,
-+ 64d0e5ace025cc929e42896c5d6beb3ef75b8244 and
-+ b55f32fe2e1538db33a1ec584b67744c724328c6
-+- 02c5dffa5bb8579c223006fa1587de9ba7409a3d - Made joinlist as
-+ authoritative source of nodes/clients but left downlist_master_choose
-+ as a source of information about left nodes
-+
-+Long story made short. This patch basically reverts
-+idea of using heuristics to choose same downlist on all nodes.
-+
-+Signed-off-by: Jan Friesse <jfriesse@redhat.com>
-+Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
-+Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
-+---
-+ exec/cpg.c | 164 ++++-------------------------------------------------
-+ 1 file changed, 11 insertions(+), 153 deletions(-)
-+
-+diff --git a/exec/cpg.c b/exec/cpg.c
-+index 78ac1e9e..b851cba3 100644
-+--- a/exec/cpg.c
-++++ b/exec/cpg.c
-+@@ -139,13 +139,6 @@ enum cpg_sync_state {
-+ CPGSYNC_JOINLIST
-+ };
-+
-+-enum cpg_downlist_state_e {
-+- CPG_DOWNLIST_NONE,
-+- CPG_DOWNLIST_WAITING_FOR_MESSAGES,
-+- CPG_DOWNLIST_APPLYING,
-+-};
-+-static enum cpg_downlist_state_e downlist_state;
-+-static struct list_head downlist_messages_head;
-+ static struct list_head joinlist_messages_head;
-+
-+ struct cpg_pd {
-+@@ -295,9 +288,7 @@ static int cpg_exec_send_downlist(void);
-+
-+ static int cpg_exec_send_joinlist(void);
-+
-+-static void downlist_messages_delete (void);
-+-
-+-static void downlist_master_choose_and_send (void);
-++static void downlist_inform_clients (void);
-+
-+ static void joinlist_inform_clients (void);
-+
-+@@ -499,14 +490,6 @@ struct req_exec_cpg_downlist {
-+ mar_uint32_t nodeids[PROCESSOR_COUNT_MAX] __attribute__((aligned(8)));
-+ };
-+
-+-struct downlist_msg {
-+- mar_uint32_t sender_nodeid;
-+- mar_uint32_t old_members __attribute__((aligned(8)));
-+- mar_uint32_t left_nodes __attribute__((aligned(8)));
-+- mar_uint32_t nodeids[PROCESSOR_COUNT_MAX] __attribute__((aligned(8)));
-+- struct list_head list;
-+-};
-+-
-+ struct joinlist_msg {
-+ mar_uint32_t sender_nodeid;
-+ uint32_t pid;
-+@@ -566,8 +549,6 @@ static void cpg_sync_init (
-+ last_sync_ring_id.nodeid = ring_id->rep.nodeid;
-+ last_sync_ring_id.seq = ring_id->seq;
-+
-+- downlist_state = CPG_DOWNLIST_WAITING_FOR_MESSAGES;
-+-
-+ entries = 0;
-+ /*
-+ * Determine list of nodeids for downlist message
-+@@ -611,14 +592,10 @@ static void cpg_sync_activate (void)
-+ my_member_list_entries * sizeof (unsigned int));
-+ my_old_member_list_entries = my_member_list_entries;
-+
-+- if (downlist_state == CPG_DOWNLIST_WAITING_FOR_MESSAGES) {
-+- downlist_master_choose_and_send ();
-+- }
-++ downlist_inform_clients ();
-+
-+ joinlist_inform_clients ();
-+
-+- downlist_messages_delete ();
-+- downlist_state = CPG_DOWNLIST_NONE;
-+ joinlist_messages_delete ();
-+
-+ notify_lib_totem_membership (NULL, my_member_list_entries, my_member_list);
-+@@ -626,8 +603,7 @@ static void cpg_sync_activate (void)
-+
-+ static void cpg_sync_abort (void)
-+ {
-+- downlist_state = CPG_DOWNLIST_NONE;
-+- downlist_messages_delete ();
-++
-+ joinlist_messages_delete ();
-+ }
-+
-+@@ -800,76 +776,17 @@ static int notify_lib_joinlist(
-+ return CS_OK;
-+ }
-+
-+-static void downlist_log(const char *msg, struct downlist_msg* dl)
-++static void downlist_log(const char *msg, struct req_exec_cpg_downlist *dl)
-+ {
-+ log_printf (LOG_DEBUG,
-+- "%s: sender %s; members(old:%d left:%d)",
-++ "%s: members(old:%d left:%d)",
-+ msg,
-+- api->totem_ifaces_print(dl->sender_nodeid),
-+ dl->old_members,
-+ dl->left_nodes);
-+ }
-+
-+-static struct downlist_msg* downlist_master_choose (void)
-++static void downlist_inform_clients (void)
-+ {
-+- struct downlist_msg *cmp;
-+- struct downlist_msg *best = NULL;
-+- struct list_head *iter;
-+- uint32_t cmp_members;
-+- uint32_t best_members;
-+- uint32_t i;
-+- int ignore_msg;
-+-
-+- for (iter = downlist_messages_head.next;
-+- iter != &downlist_messages_head;
-+- iter = iter->next) {
-+-
-+- cmp = list_entry(iter, struct downlist_msg, list);
-+- downlist_log("comparing", cmp);
-+-
-+- ignore_msg = 0;
-+- for (i = 0; i < cmp->left_nodes; i++) {
-+- if (cmp->nodeids[i] == api->totem_nodeid_get()) {
-+- log_printf (LOG_DEBUG, "Ignoring this entry because I'm in the left list\n");
-+-
-+- ignore_msg = 1;
-+- break;
-+- }
-+- }
-+-
-+- if (ignore_msg) {
-+- continue ;
-+- }
-+-
-+- if (best == NULL) {
-+- best = cmp;
-+- continue;
-+- }
-+-
-+- best_members = best->old_members - best->left_nodes;
-+- cmp_members = cmp->old_members - cmp->left_nodes;
-+-
-+- if (cmp_members > best_members) {
-+- best = cmp;
-+- } else if (cmp_members == best_members) {
-+- if (cmp->old_members > best->old_members) {
-+- best = cmp;
-+- } else if (cmp->old_members == best->old_members) {
-+- if (cmp->sender_nodeid < best->sender_nodeid) {
-+- best = cmp;
-+- }
-+- }
-+- }
-+- }
-+-
-+- assert (best != NULL);
-+-
-+- return best;
-+-}
-+-
-+-static void downlist_master_choose_and_send (void)
-+-{
-+- struct downlist_msg *stored_msg;
-+ struct list_head *iter;
-+ struct process_info *left_pi;
-+ qb_map_t *group_map;
-+@@ -884,14 +801,7 @@ static void downlist_master_choose_and_send (void)
-+ qb_map_iter_t *miter;
-+ int i, size;
-+
-+- downlist_state = CPG_DOWNLIST_APPLYING;
-+-
-+- stored_msg = downlist_master_choose ();
-+- if (!stored_msg) {
-+- log_printf (LOGSYS_LEVEL_DEBUG, "NO chosen downlist");
-+- return;
-+- }
-+- downlist_log("chosen downlist", stored_msg);
-++ downlist_log("my downlist", &g_req_exec_cpg_downlist);
-+
-+ group_map = qb_skiplist_create();
-+
-+@@ -905,9 +815,9 @@ static void downlist_master_choose_and_send (void)
-+ iter = iter->next;
-+
-+ left_pi = NULL;
-+- for (i = 0; i < stored_msg->left_nodes; i++) {
-++ for (i = 0; i < g_req_exec_cpg_downlist.left_nodes; i++) {
-+
-+- if (pi->nodeid == stored_msg->nodeids[i]) {
-++ if (pi->nodeid == g_req_exec_cpg_downlist.nodeids[i]) {
-+ left_pi = pi;
-+ break;
-+ }
-+@@ -1039,23 +949,6 @@ static void joinlist_inform_clients (void)
-+ joinlist_remove_zombie_pi_entries ();
-+ }
-+
-+-static void downlist_messages_delete (void)
-+-{
-+- struct downlist_msg *stored_msg;
-+- struct list_head *iter, *iter_next;
-+-
-+- for (iter = downlist_messages_head.next;
-+- iter != &downlist_messages_head;
-+- iter = iter_next) {
-+-
-+- iter_next = iter->next;
-+-
-+- stored_msg = list_entry(iter, struct downlist_msg, list);
-+- list_del (&stored_msg->list);
-+- free (stored_msg);
-+- }
-+-}
-+-
-+ static void joinlist_messages_delete (void)
-+ {
-+ struct joinlist_msg *stored_msg;
-+@@ -1076,7 +969,6 @@ static void joinlist_messages_delete (void)
-+
-+ static char *cpg_exec_init_fn (struct corosync_api_v1 *corosync_api)
-+ {
-+- list_init (&downlist_messages_head);
-+ list_init (&joinlist_messages_head);
-+ api = corosync_api;
-+ return (NULL);
-+@@ -1338,43 +1230,9 @@ static void message_handler_req_exec_cpg_downlist(
-+ unsigned int nodeid)
-+ {
-+ const struct req_exec_cpg_downlist *req_exec_cpg_downlist = message;
-+- int i;
-+- struct list_head *iter;
-+- struct downlist_msg *stored_msg;
-+- int found;
-+-
-+- if (downlist_state != CPG_DOWNLIST_WAITING_FOR_MESSAGES) {
-+- log_printf (LOGSYS_LEVEL_WARNING, "downlist left_list: %d received in state %d",
-+- req_exec_cpg_downlist->left_nodes, downlist_state);
-+- return;
-+- }
-+-
-+- stored_msg = malloc (sizeof (struct downlist_msg));
-+- stored_msg->sender_nodeid = nodeid;
-+- stored_msg->old_members = req_exec_cpg_downlist->old_members;
-+- stored_msg->left_nodes = req_exec_cpg_downlist->left_nodes;
-+- memcpy (stored_msg->nodeids, req_exec_cpg_downlist->nodeids,
-+- req_exec_cpg_downlist->left_nodes * sizeof (mar_uint32_t));
-+- list_init (&stored_msg->list);
-+- list_add (&stored_msg->list, &downlist_messages_head);
-+-
-+- for (i = 0; i < my_member_list_entries; i++) {
-+- found = 0;
-+- for (iter = downlist_messages_head.next;
-+- iter != &downlist_messages_head;
-+- iter = iter->next) {
-+-
-+- stored_msg = list_entry(iter, struct downlist_msg, list);
-+- if (my_member_list[i] == stored_msg->sender_nodeid) {
-+- found = 1;
-+- }
-+- }
-+- if (!found) {
-+- return;
-+- }
-+- }
-+
-+- downlist_master_choose_and_send ();
-++ log_printf (LOGSYS_LEVEL_WARNING, "downlist left_list: %d received",
-++ req_exec_cpg_downlist->left_nodes);
-+ }
-+
-+
-+--
-+2.19.1
-+
-diff --git a/debian/patches/series b/debian/patches/series
-index 78b44c78..090dade1 100644
---- a/debian/patches/series
-+++ b/debian/patches/series
-@@ -17,3 +17,4 @@ qnetd-stay-with-the-DBM-NSS-DB-format.patch
- Fix-typo-defualt-default.patch
- Please-make-the-manpages-reproducible.patch
- pve__only-start-corosync.service-if-conf-exists.patch
-+pve__cpg-Inform-clients-about-left-nodes-during-pause.patch
+++ /dev/null
-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 13:10:16 +0200
-Subject: [PATCH] d/control: bump versioned b-d on libqb
-
-otherwise the symbols files are wrong
----
- debian/control | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/debian/control b/debian/control
-index b4063466..93bb4d5c 100644
---- a/debian/control
-+++ b/debian/control
-@@ -16,7 +16,7 @@ Build-Depends:
- groff,
- libdbus-1-dev,
- libnss3-dev,
-- libqb-dev (>= 0.12),
-+ libqb-dev (>= 1.0.3~),
- librdmacm-dev [linux-any],
- libsnmp-dev,
- # libstatgrab is Linux-only until #823899 and #823900 gets fixed:
+++ /dev/null
-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
-
-Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
----
- debian/control | 1 -
- debian/rules | 2 +-
- debian/corosync.install | 2 --
- 3 files changed, 1 insertion(+), 4 deletions(-)
-
-diff --git a/debian/control b/debian/control
-index e105b0b2..b58b8b66 100644
---- a/debian/control
-+++ b/debian/control
-@@ -7,7 +7,6 @@ Uploaders:
- Ferenc Wágner <wferi@debian.org>,
- Standards-Version: 4.1.4
- Build-Depends:
-- augeas-tools,
- debhelper (>= 9~),
- dctrl-tools,
- dh-exec,
-diff --git a/debian/rules b/debian/rules
-index 7108d92c..26a6a864 100755
---- a/debian/rules
-+++ b/debian/rules
-@@ -42,7 +42,7 @@ override_dh_auto_configure:
- $(enable-rdma) \
- $(enable-monitoring) \
- $(enable-watchdog) \
-- --enable-augeas \
-+ --disable-augeas \
- --enable-snmp \
- --enable-xmlconf \
- $(enable-systemd) \
-diff --git a/debian/corosync.install b/debian/corosync.install
-index 027a58db..e928228a 100755
---- a/debian/corosync.install
-+++ b/debian/corosync.install
-@@ -26,10 +26,8 @@ usr/share/doc/corosync/README.recovery
- usr/share/doc/corosync/SECURITY
- 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
0001-add-Provides-Replaces-corosync-pve.patch
0002-don-t-install-default-corosync.conf.patch
-0003-Revert-Switch-to-Debhelper-compat-level-11.patch
-0004-restart-after-package-upgrade-is-complete.patch
-0005-remove-init-script.patch
-0006-add-corosync-pve-postinst-for-restart-on-dist-upgrad.patch
-0007-add-libcorosync4-pve-transitional-package.patch
-0008-only-start-corosync.service-if-conf-exists.patch
-0009-remove-unecessary-and-problematic-corosync-qdevice.i.patch
-0010-cpg-Inform-clients-about-left-nodes-during-pause.patch
-0011-d-control-bump-versioned-b-d-on-libqb.patch
-0012-bsys-disable-augeas-tools.patch
+0003-remove-init-script.patch
+0004-add-corosync-pve-postinst-for-restart-on-dist-upgrad.patch
+0005-add-libcorosync4-pve-transitional-package.patch
+0006-only-start-corosync.service-if-conf-exists.patch
+0007-bsys-disable-augeas-tools.patch