Re: On init in Debian
On Wed, Mar 21, 2012 at 11:06:22AM +0100, Bernd Zeimetz wrote:
> On 03/20/2012 10:49 PM, Russ Allbery wrote:
> > I don't agree. I'm happy to trade frequency of problems for more
> > difficult debugging in the rare cases that problems still happen.
> How can you be sure that such problems will happen less often? What if a
> problem is not solvable by editing a config file?
You mean "solvable" as in sprinkling sleep here and there in the init
scripts? (There's 40 occurences of sleep -- comments of course removed
-- in various init scripts on my system).
Where exactly would such a hypothetical unsolvable problem be? In the
service that the config file manages? In that case it's a bug that
should be fixed in that service. In systemd/upstart? Then it should of
course be fixed in systemd/upstart, just like a sysvinit bug should be
fixed in sysvinit, not in the init scripts.
Or are you referring to the fact that the config file won't be turing
complete? If you can find a contrived enough problem that
baffles systemd/upstart, without being a bug in the service, yet can be
solved in a clean manner by sysvinit, then I'm confident that the
upstream developers of both systemd and upstream would happily help to
add the missing functionality.
> > In other words, provided that a new solution exposed a much smaller
> > surface that *could* be buggy, I'm happy for debugging problems
> > still remaining to be somewhat more difficult.
> >> Shell scripts are easy to debug, even via a serial console.
> > I also don't agree with this, for what it's worth.
> Common init scripts are short enough to make them easy to debug. Its
> more annoying when these shellscripts call other shellscripts which call
> other shellscripts - but that is a different issue which needs to be
> solved - but not necessarily in the init system.
On my machine (which might not be the least bit representative of an
"normal" machine -- whatever what would be), the length of the init
scripts ranges from 8 to 653 lines, with the average being 115 lines.
I'd hardly call that short enough to be easy to debug.
Kind regards, David Weinehall
/) David Weinehall <firstname.lastname@example.org> /) Rime on my window (\
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // Diamond-white roses of fire //
\) http://www.acc.umu.se/~tao/ (/ Beautiful hoar-frost (/