Bug#542370: init.d script dependency loop involving lvm2, multipath-tools-boot and open-iscsi

Petter Reinholdtsen pere at hungry.com
Wed Aug 19 09:19:57 UTC 2009


Package:  open-iscsi
Version:  2.0.870~rc3-0.4
Severity: important
User:     initscripts-ng-devel at lists.alioth.debian.org
Usertags: incorrect-dependency

With the recent upload of lvm2 (version 2.02.51-1), a loop in the
init.d dependencies were introduced.  I am not quite sure what
ordering is intended, so I am unsure how to solve this.  I assign this
bug to the open-iscsi package because I suspect that is the one that
should change to run earlier in the boot, but feel free to assign it
to another package if you believe this is wrong.

These are the init.d script headers involved in the loop:

### BEGIN INIT INFO
# Provides:          lvm2 lvm
# Required-Start:    mountdevsubfs udev
# Required-Stop:
# Should-Start:      mdadm-raid cryptdisks-early multipath-tools-boot
# Should-Stop:       umountroot mdadm-raid
# X-Start-Before:    checkfs mountall
# X-Stop-After:      umountfs
# Default-Start:     S
# Default-Stop:      0 6
### END INIT INFO

### BEGIN INIT INFO
# Provides:          multipath-tools-boot
# Required-Start:    checkroot module-init-tools
# Required-Stop:     checkroot module-init-tools
# Should-Start:      iscsi
# Should-Stop:       iscsi
# Default-Start:     S
# Default-Stop:
# Short-Description: early multipath boot script
# Description:
### END INIT INFO

### BEGIN INIT INFO
# Provides:          iscsi
# Required-Start:    $local_fs
# Required-Stop:     $remote_fs sendsigs networking
# Default-Start:     S
# Default-Stop:      0 6
### END INIT INFO

### BEGIN INIT INFO
# Provides:          mountall
# Required-Start:    checkfs
# Required-Stop:
# Default-Start:     S
# Default-Stop:
# Short-Description: Mount all filesystems.
# Description:
### END INIT INFO

The loop is iscsi -> $local_fs -> mountall -> lvm2 ->
multipath-tools-boot -> iscsi.

If iscsi should start before multipath-tools-boot in the boot, it
can't have start dependencies on $local_fs.  On the other hand, it
uses binaries in /usr/bin/, and that is only guaranteed to be
available after mountnfs.sh is executed a lot later in the boot
sequence (ie should depend on $remote_fs).  Perhaps
multipath-tools-boot should not depend on iscsi?  This is the old
sequence:

  S21multipath-tools-boot
  S26lvm2
  S35mountall.sh
  S45mountnfs.sh
  S45open-iscsi

If this is the wanted sequence, the dependencies of
multipath-tools-boot need to drop the dependency on iscsi, and
open-iscsi need to have a start-dependency on $remote_fs.  If
open-iscsi should run before multipath-tools-boot, the binaries used
need to move from /usr/bin/ to /bin/, and the dependencies need to
change to reflect the new location.

Also, the shutdown dependencies look strange, having dependencies on
both $remote_fs, sendsigs and networking.  If it should start very
early, I assume it should stop very late too.  The current stop
dependencies do not make that happen.  CC to the lvm2 and
multipath-tools-boot maintainers.

Happy hacking,
-- 
Petter Reinholdtsen





More information about the pkg-lvm-maintainers mailing list