]> git.proxmox.com Git - libqb.git/blob - patches/0003-PVE-d-postinst-restart-pmxcfs-and-trigger-pve-api-up.patch
add pmxcfs restart and pve-api-updates trigger patch
[libqb.git] / patches / 0003-PVE-d-postinst-restart-pmxcfs-and-trigger-pve-api-up.patch
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
5
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.
16
17 Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
18 ---
19 debian/libqb0.postinst | 21 +++++++++++++++++++++
20 debian/triggers | 1 +
21 2 files changed, 22 insertions(+)
22 create mode 100644 debian/libqb0.postinst
23 create mode 100644 debian/triggers
24
25 diff --git a/debian/libqb0.postinst b/debian/libqb0.postinst
26 new file mode 100644
27 index 0000000..303ee57
28 --- /dev/null
29 +++ b/debian/libqb0.postinst
30 @@ -0,0 +1,21 @@
31 +#!/bin/sh
32 +
33 +set -e
34 +
35 +#DEBHELPER#
36 +
37 +case "$1" in
38 + configure)
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"
44 + fi
45 + fi
46 + fi
47 + ;;
48 +
49 +esac
50 +
51 +exit 0
52 diff --git a/debian/libqb0.triggers b/debian/libqb0.triggers
53 new file mode 100644
54 index 0000000..59dd688
55 --- /dev/null
56 +++ b/debian/libqb0.triggers
57 @@ -0,0 +1 @@
58 +activate-noawait pve-api-updates