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

Proposed by Simon Poirier
Status: Merged
Approved by: Andreas Hasenack
Approved revision: ff94e452a1bdaac820dafd1d9786260af8a45446
Merged at revision: ff94e452a1bdaac820dafd1d9786260af8a45446
Proposed branch: ~simpoir/ubuntu/+source/landscape-client:bionic-mem-usage-1685885
Merge into: ubuntu/+source/landscape-client:ubuntu/bionic-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+363092@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.

- same patch as cosmic and disco: git range-diff upload/18.01-0ubuntu3.2..bionic-mem-usage-1685885 upload/18.01-0ubuntu4.1..cosmic-mem-usage-1685885 shows no unexpected changes
- correct version number for an SRU
- bug has a filled out SRU template

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.

I'll wait for the disco upload to migrate before sponsoring this.

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

Tagged and uploaded:

$ git push pkg upload/18.01-0ubuntu3.3
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.57 KiB | 160.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-0ubuntu3.3 -> upload/18.01-0ubuntu3.3

$ dput ubuntu ../landscape-client_18.01-0ubuntu3.3_source.changes
Checking signature on .changes
gpg: ../landscape-client_18.01-0ubuntu3.3_source.changes: Valid signature from AC983EB5BF6BCBA9
Checking signature on .dsc
gpg: ../landscape-client_18.01-0ubuntu3.3.dsc: Valid signature from AC983EB5BF6BCBA9
Uploading to ubuntu (via ftp to upload.ubuntu.com):
  Uploading landscape-client_18.01-0ubuntu3.3.dsc: done.
  Uploading landscape-client_18.01-0ubuntu3.3.debian.tar.xz: done.
  Uploading landscape-client_18.01-0ubuntu3.3_source.buildinfo: done.
  Uploading landscape-client_18.01-0ubuntu3.3_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 131c6c4..5e26fb2 100644
3--- a/debian/changelog
4+++ b/debian/changelog
5@@ -1,3 +1,10 @@
6+landscape-client (18.01-0ubuntu3.3) bionic; 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-0ubuntu3.2) bionic; 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