schroot: please provide a systemd service file

Felipe Sateler fsateler at debian.org
Wed Feb 15 13:33:20 GMT 2017


On Wed, Feb 15, 2017 at 8:28 AM, Laurent Bigonville <bigon at debian.org> wrote:
> tag 835104 + patch
> thanks
>
> On Mon, 22 Aug 2016 15:59:24 +0200 Aurelien Jarno <aurel32 at debian.org>
> wrote:
>> Dear Maintainer,
>>
>> schroot provides an initscript which can take quite some time to
>> execute, for example if configured to end up all active sessions. When
>> running under systemd, it is often killed after the default 90 seconds
>> timeout. This happens regularly on the Debian porterboxes where many
>> users leave their chroot sessions opened.
>>
>> The solution is probably to provide a systemd service file running in
>> oneshot mode, so that it defaults to no timeout.
>
> I've attached here a patch to add a .service file, it calls the initscript,
> this is a quick solution but it should work.

A better solution would be to move the program part out into a script
in /usr/lib, and have both the init script and service file call out
to that. This wat if the logic changes updates are consistently
delivered to users.

I agree though that this is a quick and good enough solution.

>
> I didn't add any dependency against LVM because the VG should already for
> all services that have DefaultDependencies=yes (the default) defined.
>
> I also see that the LSB initscript has a dependency against the network, any
> idea why this is needed? Was this necessary to guarantee the network shares?
> Or was it for something else?
>
> Maybe a RequiresMountsFor=/var/lib/schroot could also be added?

I think it should be added, yes. In practice, it should have little
effect though, otherwise schroot would have bugs filed about this.

>
> On my laptop, schroot is the last LSB initscript without equivalent that
> requires the $network facility, in some situation, this makes the boot stall
> for around 20s (as it waits for the network to come online). Could it still
> be an option to add that for stretch?
>

As an interested user, thanks for the patch!

-- 

Saludos,
Felipe Sateler




More information about the Pkg-systemd-maintainers mailing list