Merge ~mitchdz/ubuntu/+source/multipath-tools:mitch/manually_restart_multipathd_on_upgrade_to_systemd_only_package-jammy into ubuntu/+source/multipath-tools:ubuntu/jammy-devel

Proposed by Mitchell Dzurick
Status: Merged
Approved by: Robie Basak
Approved revision: 15c229b450a91de92e411932e3ec61fc23cc8908
Merged at revision: 15c229b450a91de92e411932e3ec61fc23cc8908
Proposed branch: ~mitchdz/ubuntu/+source/multipath-tools:mitch/manually_restart_multipathd_on_upgrade_to_systemd_only_package-jammy
Merge into: ubuntu/+source/multipath-tools:ubuntu/jammy-devel
Diff against target: 51 lines (+37/-0)
2 files modified
debian/changelog (+7/-0)
debian/multipath-tools.postinst (+30/-0)
Reviewer Review Type Date Requested Status
Andreas Hasenack Approve
Canonical Server Reporter Pending
Ubuntu Sponsors Pending
git-ubuntu import Pending
Review via email: mp+451745@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Andreas Hasenack (ahasenack) wrote :

I added review comments to the lunar version[1] of this MP, and will continue the review there.

1. https://code.launchpad.net/~mitchdz/ubuntu/+source/multipath-tools/+git/multipath-tools/+merge/451738

Revision history for this message
Mitchell Dzurick (mitchdz) wrote :

Thanks Andreas! Let's just have the conversation in the Lunar MP, I will apply whatever changes to this MP once we are satisfied.

Revision history for this message
Andreas Hasenack (ahasenack) wrote :

Same text suggestions as in the lunar MP.

Revision history for this message
Andreas Hasenack (ahasenack) wrote :

+1 and sponsored

review: Approve

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 2330fce..92cc3fb 100644
3--- a/debian/changelog
4+++ b/debian/changelog
5@@ -1,3 +1,10 @@
6+multipath-tools (0.8.8-1ubuntu1.22.04.3) jammy; urgency=medium
7+
8+ * debian/multipath-tools.postinst: restart multipathd when upgrading from lt
9+ 0.8.8-1ubuntu1.22.04.3 (LP: #2035098)
10+
11+ -- Mitchell Dzurick <mitchell.dzurick@canonical.com> Wed, 20 Sep 2023 08:05:06 -0700
12+
13 multipath-tools (0.8.8-1ubuntu1.22.04.2) jammy; urgency=medium
14
15 [ Sergio Durigan Junior ]
16diff --git a/debian/multipath-tools.postinst b/debian/multipath-tools.postinst
17new file mode 100644
18index 0000000..f93c1dc
19--- /dev/null
20+++ b/debian/multipath-tools.postinst
21@@ -0,0 +1,30 @@
22+#!/bin/sh
23+# postinst script for multipath-tools
24+#
25+# see: dh_installdeb(1)
26+
27+set -e
28+
29+FIXED=0.8.8-1ubuntu1.22.04.3
30+# The previous multipath-tools.prerm maintainer script did not stop the
31+# multipathd.service unit, therefore it needs to be stopped here for this
32+# specific upgrade case.
33+# "systemctl daemon-reload" is specifically not being called before
34+# deb-systemd-invoke because:
35+# a) it will be called later in the script, before multipathd.service is
36+# started, so let's not call it twice
37+# b) it has system-wide effects, like running all systemd generators again
38+# c) we don't really need the new multipathd.service unit file to stop the old
39+# running daemon. In fact, one could argue it's more correct to use the old
40+# unit file to stop the old daemon.
41+# This approach will generate a one-time warning that can be ignored.
42+if dpkg --compare-versions "$2" lt-nl "$FIXED"; then
43+ echo -n "The warning about having to reload systemd units can be safely" >&2
44+ echo " ignored. Please see LP: #2035098 for details." >&2
45+
46+ deb-systemd-invoke stop 'multipathd.service' >/dev/null || true
47+fi
48+
49+#DEBHELPER#
50+
51+exit 0

Subscribers

People subscribed via source and target branches