Bug#802780: systemd: systemctl 227 fails in chroots (instead of ignoring)

Stephan Sürken Stephan.Suerken at 1und1.de
Fri Oct 23 16:43:36 BST 2015


Hi Martin,

On Fr, 2015-10-23 at 17:10 +0200, Martin Pitt wrote:
(..)
> > 227-2, sid: Fails, retval 6:
> >  # root? systemctl restart non-existing.service
> >  Failed to restart non-existing.service: Unit non-existing.service failed to load: No such file or directory.
> >  # root? systemctl restart non-existing.service
> >  Failed to restart non-existing.service: Unit non-existing.service failed to load: No such file or directory.
> 
> That looks right -- systemctl is supposed to fail for a nonexisting
> script. I don't even consider that a bug, but a fix.

hmm, sorry, seems I did a cut-and-paste error here; the last two lines
should have been

 root at manwe:~# systemctl restart wicd.service
 Failed to restart wicd.service: Unit wicd.service failed to load: No such file or directory.

So yes, for a non-existing script, that's (changed behaviour) but
correct.

For the example wicd service however, it should ignore the call like
before, afaiu.

(...)

> Starting/stopping services in a schroot has never been defined
> behaviour, as in general you can't do that. chroots should have a
> policy-rc.d (see /usr/share/doc/sysv-rc/README.policy-rc.d.gz) which
> disables service starting/stopping from package maintainer scripts.

Ahh, ok. Will have a look at that.

> Also, package maintainer scripts certainly shouldn't call invoke-rc.d
> on a nonexisting service?

Well, the "nonexisting" example should only serve to simply demonstrate
that systemd actually _has_ changed behaviour. I am concerned about
actual packages failing to install or remove in a plain chroot.

Hth!

S



More information about the Pkg-systemd-maintainers mailing list