Bug#828006: systemd: "quiet" kernel boot parameter overrides LogLevel= in /etc/systemd/system.conf

2016-06-30 Thread Brian Kroth
Awesome, thanks!

On Tue, Jun 28, 2016, 15:15 Michael Biebl  wrote:

> Control: tags -1 = patch
>
> Hi Brian,
>
> Am 28.06.2016 um 03:09 schrieb Brian Kroth:
> > Hi, I've done a little bit of testing with the patch and it does indeed
> > appear to fix the issue.  Here's the resulting diff for the package I
> > built.  Let me know if you need anything else.
>
> Thanks for that. This should be sufficient, I guess. I've marked your
> bug report as patch available and tagged it so it shows up at [1]
> I'll plan to cherry-pick this patch for the next Debian stable release
> (8.6)
>
> Regards,
> Michael
> [1]
>
> https://bugs.debian.org/cgi-bin/pkgreport.cgi?users=pkg-systemd-maintain...@lists.alioth.debian.org;tag=jessie-backport
> --
> Why is it that all of the instruments seeking intelligent life in the
> universe are pointed away from Earth?
>
>


Bug#828006: systemd: "quiet" kernel boot parameter overrides LogLevel= in /etc/systemd/system.conf

2016-06-28 Thread Michael Biebl
Control: tags -1 = patch

Hi Brian,

Am 28.06.2016 um 03:09 schrieb Brian Kroth:
> Hi, I've done a little bit of testing with the patch and it does indeed
> appear to fix the issue.  Here's the resulting diff for the package I
> built.  Let me know if you need anything else.

Thanks for that. This should be sufficient, I guess. I've marked your
bug report as patch available and tagged it so it shows up at [1]
I'll plan to cherry-pick this patch for the next Debian stable release (8.6)

Regards,
Michael
[1]
https://bugs.debian.org/cgi-bin/pkgreport.cgi?users=pkg-systemd-maintain...@lists.alioth.debian.org;tag=jessie-backport
-- 
Why is it that all of the instruments seeking intelligent life in the
universe are pointed away from Earth?



signature.asc
Description: OpenPGP digital signature


Bug#828006: systemd: "quiet" kernel boot parameter overrides LogLevel= in /etc/systemd/system.conf

2016-06-27 Thread Brian Kroth

Brian Kroth  2016-06-24 13:21:

Michael Biebl  2016-06-23 23:41:

Control: tags -1 + moreinfo

Hi Brian

Am 23.06.2016 um 19:09 schrieb Brian Kroth:

Per [1], the current version of systemd in Debian Jessie (v215) has an
issue that makes the "quiet" kernel boot parameter override values of
LogLevel= in the /etc/systemd/system.conf file (mine has LogLevel=info
explicitly set) and explicitly sets it to "notice" instead of the
documented default of "info".

There's a simple patch [2] that fixes this that I'd like to suggest
backporting.



That commit seem okayish for a jessie backport



[2]



A simple cherry-pick of 5e07a79e on top of v215 fails.
Have you backported this commit for v215 and given it some testing?
If so, can you attach the (tested) patch to this bug report.

Regards,
Michael


Hi, sorry, I ran out of time before the weekend.  I'll try and finish 
testing that and get back to you sometime on Monday.


I'll note that I had to use the following to cherrypick the patch from 
git since the changes to src/shared/log.c (just comments) failed to 
match anything nearby:


# git format-patch -1 5e07a79e84ab8b045b9df1a2719f14fc84471a1d -- 
src/core/main.c

Cheers,
Brian


Hi, I've done a little bit of testing with the patch and it does indeed 
appear to fix the issue.  Here's the resulting diff for the package I 
built.  Let me know if you need anything else.


Thanks,
Brian
diff -u -ruN systemd_215-17+deb8u4.debian/debian/changelog systemd_215-17+deb8u4.1.debian/debian/changelog
--- systemd_215-17+deb8u4.debian/debian/changelog	2016-03-03 12:51:40.0 -0600
+++ systemd_215-17+deb8u4.1.debian/debian/changelog	2016-06-24 13:08:05.0 -0500
@@ -1,3 +1,10 @@
+systemd (215-17+deb8u4.1) UNRELEASED; urgency=medium
+
+  * Backport systemd patch to not overwrite the LogLevel set in
+/etc/systemd/system.conf (Bug #828006).
+
+ -- Brian Kroth   Fri, 24 Jun 2016 13:03:25 -0500
+
 systemd (215-17+deb8u4) stable; urgency=medium
 
   [ Martin Pitt ]
diff -u -ruN systemd_215-17+deb8u4.debian/debian/patches/core-don-t-reset-log-level-to-NOTICE-if-we-get-quiet.patch systemd_215-17+deb8u4.1.debian/debian/patches/core-don-t-reset-log-level-to-NOTICE-if-we-get-quiet.patch
--- systemd_215-17+deb8u4.debian/debian/patches/core-don-t-reset-log-level-to-NOTICE-if-we-get-quiet.patch	1969-12-31 18:00:00.0 -0600
+++ systemd_215-17+deb8u4.1.debian/debian/patches/core-don-t-reset-log-level-to-NOTICE-if-we-get-quiet.patch	2016-06-24 13:18:43.0 -0500
@@ -0,0 +1,42 @@
+From 5e07a79e84ab8b045b9df1a2719f14fc84471a1d Mon Sep 17 00:00:00 2001
+From: Lennart Poettering 
+Date: Wed, 4 Feb 2015 01:42:49 +0100
+Subject: [PATCH] core: don't reset log level to NOTICE if we get quiet on the
+ kernel cmdline
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+quiet should really just have an effect on the stuff we dump on the
+console, not what we log elsewhere.
+
+Hence:
+
+debug on kernel cmdline → interpreted by every tool, turns up
+log levels to "debug" everywhere.
+
+quiet on kernel cmdline → interpreted only by PID 1 (and
+obviously the kernel) no alteration of the max log level, but
+turns off status output.
+
+http://lists.freedesktop.org/archives/systemd-devel/2014-December/026271.html
+---
+ src/core/main.c |2 --
+ 1 file changed, 2 deletions(-)
+
+diff --git a/src/core/main.c b/src/core/main.c
+index 0480bc8..0749f04 100644
+--- a/src/core/main.c
 b/src/core/main.c
+@@ -367,8 +367,6 @@ static int parse_proc_cmdline_item(const char *key, const char *value) {
+ 
+ } else if (streq(key, "quiet") && !value) {
+ 
+-log_set_max_level(LOG_NOTICE);
+-
+ if (arg_show_status == _SHOW_STATUS_UNSET)
+ arg_show_status = SHOW_STATUS_AUTO;
+ 
+-- 
+1.7.10.4
+
diff -u -ruN systemd_215-17+deb8u4.debian/debian/patches/series systemd_215-17+deb8u4.1.debian/debian/patches/series
--- systemd_215-17+deb8u4.debian/debian/patches/series	2016-03-03 12:51:40.0 -0600
+++ systemd_215-17+deb8u4.1.debian/debian/patches/series	2016-06-24 13:12:57.0 -0500
@@ -95,6 +95,7 @@
 timesyncd-allow-two-missed-replies-before-reselectin.patch
 timesyncd-don-t-reset-polling-interval-when-reselect.patch
 backlight-Avoid-error-when-state-restore-is-disabled.patch
+core-don-t-reset-log-level-to-NOTICE-if-we-get-quiet.patch
 
 ## Cherry-picked patches:
 util-avoid-considering-dpkg-temporary-files-relevant.patch


signature.asc
Description: Digital signature


Bug#828006: systemd: "quiet" kernel boot parameter overrides LogLevel= in /etc/systemd/system.conf

2016-06-24 Thread Brian Kroth

Michael Biebl  2016-06-23 23:41:

Control: tags -1 + moreinfo

Hi Brian

Am 23.06.2016 um 19:09 schrieb Brian Kroth:
> Per [1], the current version of systemd in Debian Jessie (v215) has an

issue that makes the "quiet" kernel boot parameter override values of
LogLevel= in the /etc/systemd/system.conf file (mine has LogLevel=info
explicitly set) and explicitly sets it to "notice" instead of the
documented default of "info".

There's a simple patch [2] that fixes this that I'd like to suggest
backporting.



That commit seem okayish for a jessie backport



[2]



A simple cherry-pick of 5e07a79e on top of v215 fails.
Have you backported this commit for v215 and given it some testing?
If so, can you attach the (tested) patch to this bug report.

Regards,
Michael


Hi, sorry, I ran out of time before the weekend.  I'll try and finish 
testing that and get back to you sometime on Monday.


I'll note that I had to use the following to cherrypick the patch from 
git since the changes to src/shared/log.c (just comments) failed to 
match anything nearby:


# git format-patch -1 5e07a79e84ab8b045b9df1a2719f14fc84471a1d -- 
src/core/main.c

Cheers,
Brian


signature.asc
Description: Digital signature


Bug#828006: systemd: "quiet" kernel boot parameter overrides LogLevel= in /etc/systemd/system.conf

2016-06-23 Thread Michael Biebl
Control: tags -1 + moreinfo

Hi Brian

Am 23.06.2016 um 19:09 schrieb Brian Kroth:
 > Per [1], the current version of systemd in Debian Jessie (v215) has an
> issue that makes the "quiet" kernel boot parameter override values of
> LogLevel= in the /etc/systemd/system.conf file (mine has LogLevel=info
> explicitly set) and explicitly sets it to "notice" instead of the
> documented default of "info".
> 
> There's a simple patch [2] that fixes this that I'd like to suggest
> backporting.


That commit seem okayish for a jessie backport


> [2]
> 

A simple cherry-pick of 5e07a79e on top of v215 fails.
Have you backported this commit for v215 and given it some testing?
If so, can you attach the (tested) patch to this bug report.

Regards,
Michael



-- 
Why is it that all of the instruments seeking intelligent life in the
universe are pointed away from Earth?



signature.asc
Description: OpenPGP digital signature


Bug#828006: systemd: "quiet" kernel boot parameter overrides LogLevel= in /etc/systemd/system.conf

2016-06-23 Thread Brian Kroth

Package: systemd
Version: 215-17+deb8u4
Severity: normal

Dear Maintainer,

Per [1], the current version of systemd in Debian Jessie (v215) has an 
issue that makes the "quiet" kernel boot parameter override values of 
LogLevel= in the /etc/systemd/system.conf file (mine has LogLevel=info 
explicitly set) and explicitly sets it to "notice" instead of the 
documented default of "info".


There's a simple patch [2] that fixes this that I'd like to suggest 
backporting.


Short of that, it'd be nice if it were documented somewhere (here?) that 
an alternative workaround (aside from just removing "quiet") is to also 
list "systemd.log_level=info" somewhere after quiet in the kernel boot 
parameters (eg: in /etc/default/grub's GRUB_CMDLINE_LINUX_DEFAULT 
variable).


Without that, lots of things end up not getting logged (eg: service 
start/stops, socket connections, etc.), even though the 
systemd man page and other documentation would appear to imply that the 
default LogLevel should be "info".


Let me know if you need any other info.

Thanks,
Brian

[1] 
[2] 



-- Package-specific info:

-- System Information:
Debian Release: 8.5
 APT prefers stable
 APT policy: (500, 'stable'), (120, 'testing'), (110, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 4.5.0-0.bpo.2-amd64 (SMP w/1 CPU core)
Locale: LANG=en_US.utf8, LC_CTYPE=en_US.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages systemd depends on:
ii  acl 2.2.52-2
ii  adduser 3.113+nmu3
ii  initscripts 2.88dsf-59
ii  libacl1 2.2.52-2
ii  libaudit1   1:2.4-1+b1
ii  libblkid1   2.25.2-6
ii  libc6   2.19-18+deb8u4
ii  libcap2 1:2.24-8
ii  libcap2-bin 1:2.24-8
ii  libcryptsetup4  2:1.6.6-5
ii  libgcrypt20 1.6.3-2+deb8u1
ii  libkmod218-3
ii  liblzma55.1.1alpha+20120614-2+b3
ii  libpam0g1.1.8-3.1+deb8u1+b1
ii  libselinux1 2.3-2
ii  libsystemd0 215-17+deb8u4
ii  mount   2.25.2-6
ii  sysv-rc 2.88dsf-59
ii  udev215-17+deb8u4
ii  util-linux  2.25.2-6

Versions of packages systemd recommends:
ii  dbus1.8.20-0+deb8u1
ii  libpam-systemd  215-17+deb8u4

Versions of packages systemd suggests:
pn  systemd-ui  

-- Configuration Files:
/etc/systemd/journald.conf changed [not included]
/etc/systemd/logind.conf changed [not included]
/etc/systemd/system.conf changed [not included]

-- no debconf information