1 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
2 From: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 Date: Mon, 24 Jun 2019 12:59:19 +0200
4 Subject: [PATCH] PVE: d/postinst: restart pmxcfs and trigger pve-api-updates
6 as this is a bit of an incompatible library upgrade, which normally
7 should not happen during a stable release lifecycle. But we upgrade
8 to this in Proxmox VE 5 based on Debian Stretch when upgrading the
9 system to corosync 3 for preparation to the PVVE 6 based on Debian
10 Buster upgrade. As the shared memory access changed between libqb
11 1.0.3 and 1.0.5 due to security reasons, and corosync get restarted
12 and thus loads in the new libqb, we also need to restart pmxcfs to
13 load in the new library there too. This results in a issue with all
14 those using IPCC to communicate with pmxcfs, so trigger a
15 pve-api-updates trigger to query a restart of those daemons to.
17 Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
19 debian/libqb0.postinst | 21 +++++++++++++++++++++
21 2 files changed, 22 insertions(+)
22 create mode 100644 debian/libqb0.postinst
23 create mode 100644 debian/triggers
25 diff --git a/debian/libqb0.postinst b/debian/libqb0.postinst
27 index 0000000..303ee57
29 +++ b/debian/libqb0.postinst
39 + if test -n "$2"; then
40 + # NOTE: only for the stretch upgrade for corosync 3
41 + if dpkg --compare-versions "$2" 'lt' '1.0.5-1~bpo9+2'; then
42 + if systemctl -q is-enabled "pve-cluster.service"; then
43 + deb-systemd-invoke "reload-or-try-restart" "pve-cluster.service"
52 diff --git a/debian/libqb0.triggers b/debian/libqb0.triggers
54 index 0000000..59dd688
56 +++ b/debian/libqb0.triggers
58 +activate-noawait pve-api-updates