[2/2] sshd-regen-keys: Fix some systemd obsolete warnings about using syslog

Message ID 20211008074732.212145-3-florian.bezdeka@siemens.com
State Superseded, archived
Headers show
Series sshd-regen-keys: Fix boot hang on low end hardware | expand

Commit Message

Florian Bezdeka Oct. 7, 2021, 10:47 p.m. UTC
Fixes the following warnings:

[   11.450104] systemd[1]: /lib/systemd/system/sshd-regen-keys.service:15:
[   11.450806] systemd[1]: /lib/systemd/system/sshd-regen-keys.service:16:
	Standard output type syslog is obsolete, automatically updating to journal.
	Please update your unit file, and consider removing the setting altogether.

Signed-off-by: Florian Bezdeka <florian.bezdeka@siemens.com>
---
 .../sshd-regen-keys/files/sshd-regen-keys.service               | 2 --
 1 file changed, 2 deletions(-)

Comments

Jan Kiszka Oct. 7, 2021, 11:23 p.m. UTC | #1
On 08.10.21 09:47, Florian Bezdeka wrote:
> Fixes the following warnings:
> 
> [   11.450104] systemd[1]: /lib/systemd/system/sshd-regen-keys.service:15:
> [   11.450806] systemd[1]: /lib/systemd/system/sshd-regen-keys.service:16:
> 	Standard output type syslog is obsolete, automatically updating to journal.
> 	Please update your unit file, and consider removing the setting altogether.
> 

Interesting. We are using that downstream as well, sometimes to divert
from syslog, sometimes to append the console (syslog+console). Do you
know what exactly is deprecated?

Jan

> Signed-off-by: Florian Bezdeka <florian.bezdeka@siemens.com>
> ---
>  .../sshd-regen-keys/files/sshd-regen-keys.service               | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/meta/recipes-support/sshd-regen-keys/files/sshd-regen-keys.service b/meta/recipes-support/sshd-regen-keys/files/sshd-regen-keys.service
> index 4d0a8c6..ebcee86 100644
> --- a/meta/recipes-support/sshd-regen-keys/files/sshd-regen-keys.service
> +++ b/meta/recipes-support/sshd-regen-keys/files/sshd-regen-keys.service
> @@ -13,8 +13,6 @@ RemainAfterExit=yes
>  Environment=DEBIAN_FRONTEND=noninteractive
>  ExecStart=/usr/sbin/sshd-regen-keys.sh
>  ExecStartPost=-/bin/systemctl disable sshd-regen-keys.service
> -StandardOutput=syslog
> -StandardError=syslog
>  
>  [Install]
>  WantedBy=sysinit.target
>
Florian Bezdeka Oct. 8, 2021, 12:07 a.m. UTC | #2
On Fri, 2021-10-08 at 10:23 +0200, Jan Kiszka wrote:
> On 08.10.21 09:47, Florian Bezdeka wrote:
> > Fixes the following warnings:
> > 
> > [   11.450104] systemd[1]: /lib/systemd/system/sshd-regen-keys.service:15:
> > [   11.450806] systemd[1]: /lib/systemd/system/sshd-regen-keys.service:16:
> > 	Standard output type syslog is obsolete, automatically updating to journal.
> > 	Please update your unit file, and consider removing the setting altogether.
> > 
> 
> Interesting. We are using that downstream as well, sometimes to divert
> from syslog, sometimes to append the console (syslog+console). Do you
> know what exactly is deprecated?

Just found some info in the systemd changelog/news [1] and the hint
that the system administrator can change the default of StandardOutput
and StandardError in /etc/systemd/system.conf which would be
overwritten when defined in unit files. That's why the recommendation
is to remove this options from unit files at all.

Replacements are journal and journal+console.

[1] https://github.com/systemd/systemd/blob/6706384a89ae0c462e7172588c80667190c4d9e2/NEWS#L724
> 
> Jan
> 
> > Signed-off-by: Florian Bezdeka <florian.bezdeka@siemens.com>
> > ---
> >  .../sshd-regen-keys/files/sshd-regen-keys.service               | 2 --
> >  1 file changed, 2 deletions(-)
> > 
> > diff --git a/meta/recipes-support/sshd-regen-keys/files/sshd-regen-keys.service b/meta/recipes-support/sshd-regen-keys/files/sshd-regen-keys.service
> > index 4d0a8c6..ebcee86 100644
> > --- a/meta/recipes-support/sshd-regen-keys/files/sshd-regen-keys.service
> > +++ b/meta/recipes-support/sshd-regen-keys/files/sshd-regen-keys.service
> > @@ -13,8 +13,6 @@ RemainAfterExit=yes
> >  Environment=DEBIAN_FRONTEND=noninteractive
> >  ExecStart=/usr/sbin/sshd-regen-keys.sh
> >  ExecStartPost=-/bin/systemctl disable sshd-regen-keys.service
> > -StandardOutput=syslog
> > -StandardError=syslog
> >  
> >  [Install]
> >  WantedBy=sysinit.target
> > 
>

Patch

diff --git a/meta/recipes-support/sshd-regen-keys/files/sshd-regen-keys.service b/meta/recipes-support/sshd-regen-keys/files/sshd-regen-keys.service
index 4d0a8c6..ebcee86 100644
--- a/meta/recipes-support/sshd-regen-keys/files/sshd-regen-keys.service
+++ b/meta/recipes-support/sshd-regen-keys/files/sshd-regen-keys.service
@@ -13,8 +13,6 @@  RemainAfterExit=yes
 Environment=DEBIAN_FRONTEND=noninteractive
 ExecStart=/usr/sbin/sshd-regen-keys.sh
 ExecStartPost=-/bin/systemctl disable sshd-regen-keys.service
-StandardOutput=syslog
-StandardError=syslog
 
 [Install]
 WantedBy=sysinit.target