Re: Startup single step

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Lennart/all,

Thanks for your quick responses.  I tried the systemd.confirm_spawn and got the
answer I was expecting. I agree systemd was not built to support this type
of operation and the confirm_spawn seems to work(or not) much as one would
expect. It seems to reliably fall apart the longer you wait to respond to the prompt.

Thanks again,

-Jay

On 07/03/2019 06:23 AM, Lennart Poettering wrote:
On Di, 02.07.19 12:30, Jay Burger (jay.burger@xxxxxxxxxxxxxx) wrote:

Hi,

I am curious if there is a way to single step through the systemd startup
of services?
So this exists, in theory in systemd.confirm_spawn= on the kernel
cmdline. But it's not without pitfalls. In particular, some distros
like to forcibly bind some service's stdio to the tty, which then
interferes with the asking the user stuff. More importantly though,
systemd implements a parallel boot, and a boot that cannot necessarily
be linearized (for exampe: a service X that connects to a service Y
via socket activation or bus activation necessarily means that X' and
Y' start-up need to happen in parallel), and this makes the the
interactive boot-up quite complicated to follow. Moreover lots of
software tends to apply timeouts to stuff (including systemd), and if
we interactively ask the user each time for everything these time-puts
are hit easily. For example dbus clients generally wait for 45s at
most for connection attempts and method calls, and since things add up
these are hit quickly.

hence, yes you can do this, but it's not particular fun, and falls
apart quickly on complex systems, as such interactive boot-ups tend to
behave quite differently from regular ones.

Usually it's better to just turn on debug logging, and try to figure
out things from the logs, when they happen in the same (non-)order and
(rougly) the same timing behaviour as the regular boots.

I don't find any such feature and am curious what others would think
of it. We had a similar feature in a previous life, different OS,
and developers seemed to like it. I personally think it was a handy
tool to have in the arsenal, probably not a "use it all the time"
kind of thing.

It could be triggered via a kernel command line option and in it's
simplest form, systemd would start a service and prompt the user
before continuing to the next. I know this would change timing and
dependencies may have issues but just throwing out the idea.

This could possibly even be used to single step through the shutdown
of services.
Lennart

--
Lennart Poettering, Berlin

_______________________________________________
systemd-devel mailing list
systemd-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/systemd-devel




[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux