Differences between revisions 159 and 160
Revision 159 as of 2009-08-21 19:23:44
Size: 5778
Editor: GuillemJover
Comment: Use new DebianBug wiki word to ref bugs
Revision 160 as of 2009-09-02 11:37:58
Size: 5981
Editor: ?PetterReinholdtsen
Comment: Improve text a bit.
Deletions are marked like this. Additions are marked like this.
Line 3: Line 3:
Line 5: Line 6:
The feature [[http://lists.debian.org/debian-devel-announce/2008/01/msg00004.html|was announced on debian-devel-announce]] 2008-01-17. A status update message was sent [[http://lists.debian.org/debian-devel-announce/2008/03/msg00011.html|2008-03-16]] and [[http://lists.debian.org/debian-devel-announce/2008/11/msg00007.html|2008-11-30]]. The feature has been worked on since before 2006, and [[http://lists.debian.org/debian-devel-announce/2008/01/msg00004.html|was announced on debian-devel-announce]] 2008-01-17. A status update message was sent [[http://lists.debian.org/debian-devel-announce/2008/03/msg00011.html|2008-03-16]] and [[http://lists.debian.org/debian-devel-announce/2008/11/msg00007.html|2008-11-30]].
Line 10: Line 11:
=== Example of such problems ===
 *
DebianBug:294053
 *
DebianBug:279297
* DebianBug:475626
Some examples of such problems are DebianBug:294053, DebianBug:279297 and DebianBug:475626 .
Line 16: Line 15:
This page is created to keep track of the state of this feature, to make it easier to coordinate an effort to implement it for Debian Lenny. It is [[http://lists.debian.org/debian-release/2007/06/msg00164.html|proposed]] as a [[http://release.debian.org/lenny-goals.txt|release goal]] for Lenny. This page is created to keep track of the state of this feature, to make it easier to coordinate an effort to implement it in Debian. It was [[http://lists.debian.org/debian-release/2007/06/msg00164.html|proposed]] as a [[http://release.debian.org/lenny-goals.txt|release goal]] for Lenny.  It will be the default boot ordering method for Squeeze.
During Debconf in 2009, the default in Sid was changed to use dependency based boot sequencing by default.

Dependency based boot sequence

It is possible to converting Debian to order the boot sequence using the LSB headers in the init.d scripts. This will get rid of several bugs in the current boot sequence, and make it easier to keep the sequence correct.

The feature has been worked on since before 2006, and was announced on debian-devel-announce 2008-01-17. A status update message was sent 2008-03-16 and 2008-11-30.

Advantages

Did you ever need to insert a init.d scripts Y before init.d scripts Z and after init.d script X, where both Z and X is started using boot sequence number 20 (as in 20X and 20Z)? Adding your script as 20Y would not cut it, because you need Z to start before X. To do this, in Debian you currently need to talk to the maintainer of packages with scripts Z and X, asking one of them (or both) to move their script into a different number. Dependency based boot sequencing make it possible for each package maintainer to specify the dependencies of its scripts, and leave the number allocation to the dependency resolver.

Some examples of such problems are 294053, 279297 and 475626 .

Status

This page is created to keep track of the state of this feature, to make it easier to coordinate an effort to implement it in Debian. It was proposed as a release goal for Lenny. It will be the default boot ordering method for Squeeze. During Debconf in 2009, the default in Sid was changed to use dependency based boot sequencing by default.

A number of bug reports are submitted to request LSB headers in init.d scripts. It is useful to track the ones open in testing as well.

Plan of migration

This is a proposal for a plan to migrate all of Debian over to dependency based boot sequencing.

  1. Change the debconf default in insserv to enable dependency based boot sequencing when the package is installed, if it is safe to do so. Show the question again on upgrades if the conversion isn't done yet. Remove/disable the option to disable insserv after it is enabled.
  2. Change sysv-rc to depend on insserv, to pull it in on all (non-file-rc) installations.
  3. Wait 6 months, while rewriting policy text to document the new way update-rc.d is going to work
  4. Drop support for specifying sequence numbers in update-rc.d.

This will enable dependency based boot sequencing for all in Debian from Squeeze and onwards.

Known issues

  • Some init.d scripts provide the same service, and this is not supported by insserv. The provided service should be unique for each script. Example problems caused by this:
    • It is not possible to migrate between exim and postfix without purging the other package.
    • It is not possible to migrate between inetutils-inetd and openbsd-inetd without purging the other package.
    • It is not possible to activate insserv when obsolete scripts, which are removed from their package but not properly removed from the disk, are still present in /etc/init.d/. It might also create problems with package installation.
  • Some init.d scripts have buggy headers, making them fail to install properly in the boot sequence.

To see the boot and reboot sequence dependecy graph, use

aptitude install insserv graphviz
/usr/share/insserv/check-initd-order -g > boot.dot
/usr/share/insserv/check-initd-order -g -k > reboot.dot
dotty boot.dot
dotty reboot.dot

The number of packages with init.d scripts was counted using apt-file update && apt-file search etc/init.d|cut -d: -f1|sort -u|wc -l in Debian/Sid. The number of packages missing LSB headers are fetched from the lintian reports for the init.d-script-missing-lsb-section tag. The number of base and desktop packages missing headers were counted by creating chroots with debootstrap and tasksel.

To enable dependency based boot, the insserv package can be used. At debconf7 and FOSDEM 2008 (video), Petter Reinholdtsen gave a talk about the dependency based boot system. To enable it, install the insserv package and activate it like this:

aptitude install insserv && dpkg-reconfigure insserv

Make sure to use insserv version 1.09.0-6 or higher.

To usertag related bugs, send an email to request (at) bugs.debian.org, with content like this:

user initscripts-ng-devel (at) lists.alioth.debian.org
usertag 361054 + incorrect-dependency
usertag 361358 + missing-dependency
thanks

Packages left to fix

Generated using dd-list $(lynx -nolist -dump http://lintian.debian.org/reports/tags/init.d-script-missing-lsb-section.html | grep binary | cut -d" " -f1 | sort)

Daniel Baumann <daniel@debian.org>
   ipmasq

Peter S Galbraith <psg@debian.org>
   powstatd

Rene Mayrhofer <rmayr@debian.org>
   openswan