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

Michael Biebl biebl at debian.org
Thu Mar 1 17:46:12 GMT 2018


Control: tags -1 moreinfo unreproducible

Am 01.03.2018 um 16:00 schrieb Martin von Wittich:
> 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):

Hm, right. I completely missed the part about "valid-template", and no,
I didn't have postgresql at .service.

But I'm not sure if what you are seeing is actually a bug. A templated
service does not necessarily need a representation on disk. It is very
much possible, that you simply want to pass a command flag to a daemon
for example.

So systemd will happily start/stop/restart such a noop in your case. The
only case where it fails is, on a reload, because there wasn't actually
a process running which could be reloaded.

Sounds a bit strange but is imho consistent.






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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <http://alioth-lists.debian.net/pipermail/pkg-systemd-maintainers/attachments/20180301/501fd62f/attachment-0002.sig>


More information about the Pkg-systemd-maintainers mailing list