[systemd-devel] [PATCH 3/4] manager: stop start timeout when sysinit.target is reached

Zbigniew Jędrzejewski-Szmek zbyszek at in.waw.pl
Mon Oct 27 19:52:32 PDT 2014


On Tue, Oct 28, 2014 at 02:32:37AM +0100, Lennart Poettering wrote:
> On Mon, 27.10.14 23:07, Lennart Poettering (lennart at poettering.net) wrote:
> 
> > On Mon, 27.10.14 20:03, Zbigniew Jędrzejewski-Szmek (zbyszek at in.waw.pl) wrote:
> > 
> > > On Mon, Oct 27, 2014 at 06:51:08PM +0100, Lennart Poettering wrote:
> > > > On Sat, 25.10.14 21:43, Zbigniew Jędrzejewski-Szmek (zbyszek at in.waw.pl) wrote:
> > > > 
> > > > >  
> > > > > +        if (result == JOB_DONE && unit_has_name(u, SPECIAL_SYSINIT_TARGET))
> > > > > +                manager_cancel_start_timeout(u->manager);
> > > > > +
> > > > 
> > > > I'd really prefer to hook this up with manager_state(), so that we
> > > > don't have to hardcode the target name more than once, and so that we
> > > > know that the rescue/emergency mode is properly handled...
> > > Yeah, I thought about that too, but only after I sent the patch.
> > 
> > I'l look into hacking this up now, I really want to get the release
> > out of the door now.
> 
> I hacked this up now. Though after thinking forth and back quite
> differently than what we had before. I now removed the system-wide
> timeout, in favour of beefing up the existing JobTimeoutSec= stuff we
> have in units, so that we can set per-unit timeouts that trigger
> failure actions. With this in place I have now set default timeouts of
> 15min on basic.target and 30min on poweroff.target+reboot.target. 
Good, that sounds more flexible (and simpler). I'll push the change
to avoid clobbering of password prompts. I'll also add additional console
prints before each failure action, so that people have a chance of knowing
why their machine suddently turned off.

Zbyszek


More information about the systemd-devel mailing list