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

Proposed by Simon Poirier
Status: Merged
Approved by: Andreas Hasenack
Approved revision: b05a9472ee4e6d0c4ef66c2341fc34c90c6472ff
Merged at revision: b05a9472ee4e6d0c4ef66c2341fc34c90c6472ff
Proposed branch: ~simpoir/ubuntu/+source/landscape-client:disco-mem-usage-1685885
Merge into: ubuntu/+source/landscape-client:ubuntu/disco-devel
Diff against target: 60 lines (+38/-0)
3 files modified
debian/changelog (+7/-0)
debian/patches/mem-usage-1685885.patch (+30/-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+363090@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Andreas Hasenack (ahasenack) wrote :

Thanks, this looks good and is a +1.

Two points, for the next ones:
- please separate the d/changelog change into its own commit. It helps tremendously when backporting (cherry-picking) fixes for SRUs (which you might have discovered, since this fix will be SRUed), and also when just wanting to take a peek at what the actual changes are, without d/changelog "noise" :)
- make the MP for the development release of ubuntu against the ubuntu/devel branch, that is always the development release. Today it matches ubuntu/disco-devel.

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

Tagged and uploaded

$ git push pkg upload/18.01-0ubuntu7
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 | 264.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/18.01-0ubuntu7 -> upload/18.01-0ubuntu7

$ dput ubuntu ../landscape-client_18.01-0ubuntu7_source.changes
Checking signature on .changes
gpg: ../landscape-client_18.01-0ubuntu7_source.changes: Valid signature from AC983EB5BF6BCBA9
Checking signature on .dsc
gpg: ../landscape-client_18.01-0ubuntu7.dsc: Valid signature from AC983EB5BF6BCBA9
Uploading to ubuntu (via ftp to upload.ubuntu.com):
  Uploading landscape-client_18.01-0ubuntu7.dsc: done.
  Uploading landscape-client_18.01-0ubuntu7.debian.tar.xz: done.
  Uploading landscape-client_18.01-0ubuntu7_source.buildinfo: done.
  Uploading landscape-client_18.01-0ubuntu7_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 5d64e8c..c037c70 100644
3--- a/debian/changelog
4+++ b/debian/changelog
5@@ -1,3 +1,10 @@
6+landscape-client (18.01-0ubuntu7) disco; 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 (18.01-0ubuntu6) disco; 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..2c57a2c
19--- /dev/null
20+++ b/debian/patches/mem-usage-1685885.patch
21@@ -0,0 +1,30 @@
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: upstream, https://github.com/CanonicalLtd/landscape-client/commit/7f98306e3159e956798b70d2b5fc8c0773373fdd
26+Bug-Ubuntu: https://bugs.launchpad.net/bugs/1685885
27+Last-Update: 2019-02-08
28+
29+diff --git a/landscape/client/deployment.py b/landscape/client/deployment.py
30+index d5ac5aeb..8c2f905e 100644
31+--- a/landscape/client/deployment.py
32++++ b/landscape/client/deployment.py
33+@@ -2,6 +2,7 @@ import os.path
34+ import sys
35+
36+ from optparse import SUPPRESS_HELP
37++from twisted.logger import globalLogBeginner
38+
39+ from landscape import VERSION
40+ from landscape.lib import logging
41+@@ -16,6 +17,10 @@ def init_logging(configuration, program_name):
42+ logging.init_app_logging(configuration.log_dir, configuration.log_level,
43+ progname=program_name,
44+ quiet=configuration.quiet)
45++ # Initialize twisted logging, even if we don't explicitly use it,
46++ # because of leaky logs https://twistedmatrix.com/trac/ticket/8164
47++ globalLogBeginner.beginLoggingTo(
48++ [lambda _: None], redirectStandardIO=False, discardBuffer=True)
49+
50+
51+ def _is_script(filename=sys.argv[0],
52diff --git a/debian/patches/series b/debian/patches/series
53index 8fe2ee6..79d72dd 100644
54--- a/debian/patches/series
55+++ b/debian/patches/series
56@@ -6,3 +6,4 @@ release-upgrade-success.patch
57 post-upgrade-reboot.patch
58 unicode-tags-script.patch
59 1616116-resync-loop.patch
60+mem-usage-1685885.patch

Subscribers

People subscribed via source and target branches