Merge ~andreserl/maas:lp1789469_maas-common into maas:master

Proposed by Andres Rodriguez
Status: Merged
Approved by: Andres Rodriguez
Approved revision: 160725658d2ebf5e61f0d56449b2f8cfc357ba07
Merge reported by: MAAS Lander
Merged at revision: not available
Proposed branch: ~andreserl/maas:lp1789469_maas-common
Merge into: maas:master
Diff against target: 65 lines (+25/-2)
4 files modified
debian/changelog (+5/-0)
debian/maas-common.postrm (+2/-2)
debian/maas-common.prerm (+9/-0)
debian/maas-rack-controller.prerm (+9/-0)
Reviewer Review Type Date Requested Status
Mike Pontillo (community) Approve
Review via email: mp+355798@code.launchpad.net

Commit message

LP: #1789469 - Correctly handle the removal of services to prevent maas-common removal from failing.

To post a comment you must log in.
Revision history for this message
Mike Pontillo (mpontillo) wrote :

Looking at the rendered version of /var/lib/dpkg/info/maas-common.postrm, I can see how this could help address the symptom. I'm not positive it's a full fix, but I think we should go ahead and land this.

review: Approve
faa6562... by Andres Rodriguez

Correctly stop services during removal

1607256... by Andres Rodriguez

Update debian/changelog

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/debian/changelog b/debian/changelog
2index 1ec1962..1f131db 100644
3--- a/debian/changelog
4+++ b/debian/changelog
5@@ -5,6 +5,11 @@ maas (2.5.0~beta2-0ubuntu1) UNRELEASED; urgency=medium
6 in 8 seconds, if not kill it with 'mixed' mode.
7 * debian/control: Drop python3-jinja2 as it is no longer needed to
8 generate documentation.
9+ * debian/maas-common.postrm: Run debhelper handling before manual removal
10+ actions.
11+ * debian/maas-rack-controller.prerm: Add & handle stop of
12+ maas-rackd.service.
13+ * debian/maas-common.prerm: Add & handle stop of maas-syslog.service.
14
15 -- Andres Rodriguez <andreserl@ubuntu.com> Wed, 19 Sep 2018 03:10:49 -0400
16
17diff --git a/debian/maas-common.postrm b/debian/maas-common.postrm
18index 06bf180..b4c12c3 100644
19--- a/debian/maas-common.postrm
20+++ b/debian/maas-common.postrm
21@@ -2,6 +2,8 @@
22
23 set -e
24
25+#DEBHELPER#
26+
27 case "$1" in
28 purge)
29 # Deleting user/group
30@@ -17,5 +19,3 @@ case "$1" in
31 esac
32
33 rm -f /etc/rsyslog.d/99-maas.conf
34-
35-#DEBHELPER#
36diff --git a/debian/maas-common.prerm b/debian/maas-common.prerm
37new file mode 100644
38index 0000000..15c427e
39--- /dev/null
40+++ b/debian/maas-common.prerm
41@@ -0,0 +1,9 @@
42+#!/bin/sh
43+
44+set -e
45+
46+#DEBHELPER#
47+
48+if [ -d /run/systemd/system ]; then
49+ deb-systemd-invoke stop 'maas-syslog.service' >/dev/null || true
50+fi
51diff --git a/debian/maas-rack-controller.prerm b/debian/maas-rack-controller.prerm
52new file mode 100644
53index 0000000..ae7a019
54--- /dev/null
55+++ b/debian/maas-rack-controller.prerm
56@@ -0,0 +1,9 @@
57+#!/bin/sh
58+
59+set -e
60+
61+#DEBHELPER#
62+
63+if [ -d /run/systemd/system ]; then
64+ deb-systemd-invoke stop 'maas-rackd.service' >/dev/null || true
65+fi

Subscribers

People subscribed via source and target branches