Bug#891836: systemd: systemctl start/stop/restart valid-template at invalid-instance doesn't cause errors

Martin von Wittich martin.von.wittich at iserv.eu
Thu Mar 1 15:00:19 GMT 2018


Hi Michael,

On Thu, 1 Mar 2018 15:10:26 +0100 Michael Biebl <biebl at debian.org> wrote:
> I can't reproduce this, neither on v237 nor on v232:
> 
> # systemctl stop postgresql at does-not-exist
> Failed to stop postgresql at does-not-exist.service: Unit
> postgresql at does-not-exist.service not loaded.
> 
> # systemctl start postgresql at does-not-exist
> Failed to start postgresql at does-not-exist.service: Unit
> postgresql at does-not-exist.service not found.
> 
> # systemctl restart postgresql at does-not-exist
> Failed to restart postgresql at does-not-exist.service: Unit
> postgresql at does-not-exist.service not found.

Do you have a postgresql template installed (should be the case when you 
have a postgresql-9.{4,6} (jessie/stretch) server package installed)? If 
not, try another template, maybe getty (I hope that's available on every 
system, would make reproducing this a lot easier):

stable.iserv.eu ~ # systemctl stop getty at does-not-exist
stable.iserv.eu ~ #

If the template itself doesn't exist, this leads to the expected error 
message:

stable.iserv.eu ~ # systemctl stop does-not-exist at does-not-exist
Failed to stop does-not-exist at does-not-exist.service: Unit 
does-not-exist at does-not-exist.service not loaded.

To ensure that this issue is not caused by our custom server 
configuration, I also tried to reproduce the issue on my Ubuntu 17.10 
client:

martin at dogmeat ~ % systemd --version
systemd 234
+PAM +AUDIT +SELINUX +IMA +APPARMOR +SMACK +SYSVINIT +UTMP 
+LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 +SECCOMP +BLKID +ELFUTILS 
+KMOD -IDN2 +IDN default-hierarchy=hybrid

martin at dogmeat ~ % sudo systemctl restart getty at does-not-exist
martin at dogmeat ~ %

-- 
Mit freundlichen Grüßen
Martin v. Wittich

IServ GmbH
Bültenweg 73
38106 Braunschweig

Telefon:   0531-2243666-0
Fax:       0531-2243666-9
E-Mail:    info at iserv.eu
Internet:  iserv.eu

USt-IdNr. DE265149425 | Amtsgericht Braunschweig | HRB 201822
Geschäftsführer: Benjamin Heindl, Martin Hüppe, Jörg Ludwig




More information about the Pkg-systemd-maintainers mailing list