Merge ~simpoir/ubuntu/+source/landscape-client:xenial-mem-usage-1685885 into ubuntu/+source/landscape-client:ubuntu/xenial-devel

Proposed by Simon Poirier
Status: Merged
Approved by: Andreas Hasenack
Approved revision: 3148cd628eeb66ae99f3f40124dad95e954d2798
Merged at revision: 3148cd628eeb66ae99f3f40124dad95e954d2798
Proposed branch: ~simpoir/ubuntu/+source/landscape-client:xenial-mem-usage-1685885
Merge into: ubuntu/+source/landscape-client:ubuntu/xenial-devel
Diff against target: 58 lines (+36/-0)
3 files modified
debian/changelog (+7/-0)
debian/patches/mem-usage-1685885.patch (+28/-0)
debian/patches/series (+1/-0)
Reviewer Review Type Date Requested Status
Andreas Hasenack Approve
Canonical Server Pending
git-ubuntu developers Pending
Review via email: mp+363093@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Andreas Hasenack (ahasenack) wrote :

Thanks. Small changes inline, since this time the patch had to be backported.

review: Needs Fixing
Revision history for this message
Simon Poirier (simpoir) :
Revision history for this message
Andreas Hasenack (ahasenack) wrote :

Looks good, thanks.

- backported patch, since the xenial version of landscape-client is much older
- dep3 headers ok
- changelog version for an SRU ok
- SRU template filled in

+1

For the next one, please separate the d/changelog change into its own commit. This makes it easier to compare the changes among different releases and allows for easy cherry-picking.

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

Tagged and uploaded.

$ git push pkg upload/16.03-0ubuntu2.16.04.6
Enumerating objects: 13, done.
Counting objects: 100% (13/13), done.
Delta compression using up to 4 threads
Compressing objects: 100% (8/8), done.
Writing objects: 100% (8/8), 1.55 KiB | 226.00 KiB/s, done.
Total 8 (delta 5), reused 0 (delta 0)
To ssh://git.launchpad.net/~usd-import-team/ubuntu/+source/landscape-client
 * [new tag] upload/16.03-0ubuntu2.16.04.6 -> upload/16.03-0ubuntu2.16.04.6

$ dput ubuntu ../landscape-client_16.03-0ubuntu2.16.04.6_source.changes
Checking signature on .changes
gpg: ../landscape-client_16.03-0ubuntu2.16.04.6_source.changes: Valid signature from AC983EB5BF6BCBA9
Checking signature on .dsc
gpg: ../landscape-client_16.03-0ubuntu2.16.04.6.dsc: Valid signature from AC983EB5BF6BCBA9
Uploading to ubuntu (via ftp to upload.ubuntu.com):
  Uploading landscape-client_16.03-0ubuntu2.16.04.6.dsc: done.
  Uploading landscape-client_16.03-0ubuntu2.16.04.6.debian.tar.xz: done.
  Uploading landscape-client_16.03-0ubuntu2.16.04.6_source.changes: done.
Successfully uploaded packages.

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 fd00c5a..fe8549b 100644
3--- a/debian/changelog
4+++ b/debian/changelog
5@@ -1,3 +1,10 @@
6+landscape-client (16.03-0ubuntu2.16.04.6) xenial; urgency=medium
7+
8+ * debian/patches/mem-usage-1685885.patch: Reduce memory usage by
9+ unused twisted logs. (LP: #1685885)
10+
11+ -- Simon Poirier <simon.poirier@canonical.com> Fri, 08 Feb 2019 12:02:17 -0500
12+
13 landscape-client (16.03-0ubuntu2.16.04.5) xenial; urgency=medium
14
15 * debian/patches/nutanix-kvm.patch: Update vm_info.py to include Nutanix
16diff --git a/debian/patches/mem-usage-1685885.patch b/debian/patches/mem-usage-1685885.patch
17new file mode 100644
18index 0000000..f5dcc15
19--- /dev/null
20+++ b/debian/patches/mem-usage-1685885.patch
21@@ -0,0 +1,28 @@
22+Description: Reduce memory usage by unused twisted logs.
23+ This initializes the twisted logging to clear its buffer.
24+Author: Simon Poirier <simon.poirier@canonical.com>
25+Origin: backport, https://github.com/CanonicalLtd/landscape-client/commit/7f98306e3159e956798b70d2b5fc8c0773373fdd
26+Bug-Ubuntu: https://bugs.launchpad.net/bugs/1685885
27+Last-Update: 2019-02-12
28+
29+--- a/landscape/deployment.py
30++++ b/landscape/deployment.py
31+@@ -7,6 +7,7 @@
32+ FileHandler, StreamHandler, Formatter)
33+
34+ from optparse import OptionParser, SUPPRESS_HELP
35++from twisted.logger import globalLogBeginner
36+
37+ from landscape import VERSION
38+ from landscape.lib.persist import Persist
39+@@ -29,6 +30,10 @@
40+ format = ("%(asctime)s %(levelname)-8s [%(threadName)-10s] "
41+ "%(message)s")
42+ handler.setFormatter(Formatter(format))
43++ # Initialize twisted logging, even if we don't explicitly use it,
44++ # because of leaky logs https://twistedmatrix.com/trac/ticket/8164
45++ globalLogBeginner.beginLoggingTo(
46++ [lambda _: None], redirectStandardIO=False, discardBuffer=True)
47+
48+
49+ class ConfigSpecOptionParser(OptionParser):
50diff --git a/debian/patches/series b/debian/patches/series
51index acc9db8..0097168 100644
52--- a/debian/patches/series
53+++ b/debian/patches/series
54@@ -12,3 +12,4 @@ nutanix-kvm.patch
55 release-upgrade-success.patch
56 post-upgrade-reboot.patch
57 1616116-resync-loop.patch
58+mem-usage-1685885.patch

Subscribers

People subscribed via source and target branches