Merge ~mitchdz/ubuntu/+source/multipath-tools:mitch/manually_restart_service_socket into ubuntu/+source/multipath-tools:ubuntu/mantic-devel

Proposed by Mitchell Dzurick
Status: Work in progress
Proposed branch: ~mitchdz/ubuntu/+source/multipath-tools:mitch/manually_restart_service_socket
Merge into: ubuntu/+source/multipath-tools:ubuntu/mantic-devel
Diff against target: 58 lines (+32/-1)
3 files modified
debian/changelog (+8/-0)
debian/multipath-tools.postinst (+20/-0)
debian/rules (+4/-1)
Reviewer Review Type Date Requested Status
git-ubuntu import Pending
Review via email: mp+451558@code.launchpad.net
To post a comment you must log in.

Unmerged commits

2a791b7... by Mitchell Dzurick

changelog

ff2e8c7... by Mitchell Dzurick

d/[rules|multipath-tools.posinst]: manually start/restart service/socket

Manually restart multipath-tools service/socket to force the order to be
Socket -> Service
As the socket should never be started after the service.
See (LP: #2034471)

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 032e3d0..07c65aa 100644
3--- a/debian/changelog
4+++ b/debian/changelog
5@@ -1,3 +1,11 @@
6+multipath-tools (0.9.4-5ubuntu4) mantic; urgency=medium
7+
8+ * Manually handle starting/restarting multipathd (LP: #2034471)
9+ - d/rules: add --no-start to dh_installsystemd
10+ - d/multipath-tools.posinst: manually start/restart service/socket
11+
12+ -- Mitchell Dzurick <mitchell.dzurick@canonical.com> Mon, 18 Sep 2023 10:51:51 -0400
13+
14 multipath-tools (0.9.4-5ubuntu3) mantic; urgency=medium
15
16 * d/initramfs/scripts/{local-bottom,local-top}/multipath: Make initramfs
17diff --git a/debian/multipath-tools.postinst b/debian/multipath-tools.postinst
18new file mode 100644
19index 0000000..965656c
20--- /dev/null
21+++ b/debian/multipath-tools.postinst
22@@ -0,0 +1,20 @@
23+#!/bin/sh
24+# postinst script for multipath-tools
25+#
26+# see: dh_installdeb(1)
27+
28+set -e
29+
30+#DEBHELPER#
31+
32+# See (LP: #2034471)
33+# Handles ordering the socket/service start/restart manually.
34+if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ] || [ "$1" = "abort-deconfigure" ] || [ "$1" = "abort-remove" ] ; then
35+ if [ -d /run/systemd/system ]; then
36+ systemctl --system daemon-reload >/dev/null || true
37+ deb-systemd-invoke stop multipathd.service multipathd.socket >/dev/null || true
38+ deb-systemd-invoke start multipathd.socket multipathd.service >/dev/null || true
39+ fi
40+fi
41+
42+exit 0
43diff --git a/debian/rules b/debian/rules
44index b2f9922..5dd4f40 100755
45--- a/debian/rules
46+++ b/debian/rules
47@@ -91,7 +91,10 @@ override_dh_installudev:
48 override_dh_installsystemd:
49 dh_link -a lib/systemd/system/multipathd.service \
50 lib/systemd/system/multipath-tools.service
51- dh_installsystemd -pmultipath-tools multipathd.service
52+ # Adding --no-start, but service/socket is started/restarted manually in
53+ # multipath-tools.postinst to force the correct order of start/stop
54+ # see (LP: #2034471)
55+ dh_installsystemd -pmultipath-tools multipathd.service --no-start
56
57 override_dh_makeshlibs:
58 dh_makeshlibs -a --add-udeb=multipath-udeb

Subscribers

People subscribed via source and target branches