Merge ~simpoir/ubuntu/+source/landscape-client:groovy-uncleaned-lockfiles into ubuntu/+source/landscape-client:ubuntu/groovy-devel

Proposed by Simon Poirier
Status: Merged
Merge reported by: Simon Poirier
Merged at revision: fe51d9396ca83765c99ba3a04793558b4497b5d8
Proposed branch: ~simpoir/ubuntu/+source/landscape-client:groovy-uncleaned-lockfiles
Merge into: ubuntu/+source/landscape-client:ubuntu/groovy-devel
Diff against target: 85 lines (+64/-0)
3 files modified
debian/changelog (+7/-0)
debian/patches/0003-clean-publisher-shutdown.patch (+56/-0)
debian/patches/series (+1/-0)
Reviewer Review Type Date Requested Status
Eric Desrochers Pending
git-ubuntu developers Pending
Review via email: mp+399001@code.launchpad.net
To post a comment you must log in.

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 7cd0974..c7feb18 100644
3--- a/debian/changelog
4+++ b/debian/changelog
5@@ -1,3 +1,10 @@
6+landscape-client (19.12-0ubuntu6) groovy; urgency=medium
7+
8+ * d/p/0003-clean-publisher-shutdown.patch:
9+ Let publisher services shutdown cleanly (LP: #1870087)
10+
11+ -- Simon Poirier <simon.poirier@canonical.com> Thu, 27 Aug 2020 17:44:25 -0400
12+
13 landscape-client (19.12-0ubuntu5) groovy; urgency=medium
14
15 * d/landscape-client.service (LP: #1870087)
16diff --git a/debian/patches/0003-clean-publisher-shutdown.patch b/debian/patches/0003-clean-publisher-shutdown.patch
17new file mode 100644
18index 0000000..98bb464
19--- /dev/null
20+++ b/debian/patches/0003-clean-publisher-shutdown.patch
21@@ -0,0 +1,56 @@
22+Description: Return missing deferred on service shutdown.
23+ This should allow services to let their publisher shut down and clean
24+ after itself, thus avoiding stale locks and sockets.
25+Author: Simon Poirier <simon.poirier@canonical.com>
26+Origin: upstream, https://github.com/CanonicalLtd/landscape-client/commit/8a617a1aafbbe9d972410707563710c3cbedd8e7
27+Bug-Ubuntu: https://bugs.launchpad.net/bugs/1870087
28+
29+diff --git a/landscape/client/broker/service.py b/landscape/client/broker/service.py
30+index 6e89414e..7e361492 100644
31+--- a/landscape/client/broker/service.py
32++++ b/landscape/client/broker/service.py
33+@@ -82,10 +82,11 @@ class BrokerService(LandscapeService):
34+
35+ def stopService(self):
36+ """Stop the broker."""
37+- self.publisher.stop()
38++ deferred = self.publisher.stop()
39+ self.exchanger.stop()
40+ self.pinger.stop()
41+ super(BrokerService, self).stopService()
42++ return deferred
43+
44+
45+ def run(args):
46+diff --git a/landscape/client/manager/service.py b/landscape/client/manager/service.py
47+index b95f4ebf..ef543d6f 100644
48+--- a/landscape/client/manager/service.py
49++++ b/landscape/client/manager/service.py
50+@@ -54,8 +54,9 @@ class ManagerService(LandscapeService):
51+ def stopService(self):
52+ """Stop the manager and close the connection with the broker."""
53+ self.connector.disconnect()
54+- self.publisher.stop()
55++ deferred = self.publisher.stop()
56+ super(ManagerService, self).stopService()
57++ return deferred
58+
59+
60+ def run(args):
61+diff --git a/landscape/client/monitor/service.py b/landscape/client/monitor/service.py
62+index 77d6f20f..6b9c63a6 100644
63+--- a/landscape/client/monitor/service.py
64++++ b/landscape/client/monitor/service.py
65+@@ -56,10 +56,11 @@ class MonitorService(LandscapeService):
66+ The monitor is flushed to ensure that things like persist databases
67+ get saved to disk.
68+ """
69+- self.publisher.stop()
70++ deferred = self.publisher.stop()
71+ self.monitor.flush()
72+ self.connector.disconnect()
73+ super(MonitorService, self).stopService()
74++ return deferred
75+
76+
77+ def run(args):
78diff --git a/debian/patches/series b/debian/patches/series
79index 6b9a76f..3cdf425 100644
80--- a/debian/patches/series
81+++ b/debian/patches/series
82@@ -1,2 +1,3 @@
83 0001-Handle-EINVAL-error-of-SIOCETHTOOL-ioctl.patch
84 0002-lp1870087-stale-locks.patch
85+0003-clean-publisher-shutdown.patch

Subscribers

People subscribed via source and target branches