]> git.proxmox.com Git - ceph.git/blob - patches/0009-remove-legacy-pve-ceph-osd-activation-script-in-post.patch
rebase patches
[ceph.git] / patches / 0009-remove-legacy-pve-ceph-osd-activation-script-in-post.patch
1 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
2 From: Dominik Csapak <d.csapak@proxmox.com>
3 Date: Thu, 27 Jun 2019 14:37:06 +0200
4 Subject: [PATCH 09/10] remove legacy pve ceph osd activation script in
5 postinst of ceph-osd
6
7 that service was distributed by pve-manager (but not in a regular way)
8 and only executed ceph-disk activate-all
9
10 this fails on nautilus and has to be removed when upgrading from
11 luminous
12
13 Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
14 ---
15 debian/ceph-osd.postinst | 13 +++++++++++++
16 1 file changed, 13 insertions(+)
17
18 diff --git a/debian/ceph-osd.postinst b/debian/ceph-osd.postinst
19 index 5e44548fe8..7cc1f6ce14 100644
20 --- a/debian/ceph-osd.postinst
21 +++ b/debian/ceph-osd.postinst
22 @@ -25,6 +25,19 @@ case "$1" in
23 configure)
24 [ -x /etc/init.d/procps ] && invoke-rc.d procps restart || :
25 [ -x /sbin/start ] && start ceph-osd-all || :
26 +
27 + # remove legacy osd activation service, FIXME remove with next ceph >> 14
28 + if [ ! -z "$2" ] && dpkg --compare-versions "$2" lt '14.2.1-pve2'; then
29 + CEPHSERVICE="/etc/systemd/system/ceph.service"
30 + MD5SUM="f716952fcc5dda4ecdb153c02627da52 $CEPHSERVICE"
31 + if [ -e "$CEPHSERVICE" ] && [ "$(md5sum $CEPHSERVICE)" = "$MD5SUM" ]; then
32 + if [ -e /etc/systemd/system/multi-user.target.wants/ceph.service ]; then
33 + deb-systemd-invoke disable ceph.service >/dev/null || :
34 + fi
35 + rm "$CEPHSERVICE" || :
36 + systemctl --system daemon-reload >/dev/null || :
37 + fi
38 + fi
39 ;;
40 abort-upgrade|abort-remove|abort-deconfigure)
41 :