Return code of setup-storage

Adrian Glaubitz glaubitz at physik.fu-berlin.de
Thu Jun 3 18:29:04 CEST 2010


Hi,

I already posted this in #fai but I would also like to post this on
the list since I think it might be a bug in setup-storage.

Recently, I rebuilt our Squeeze FAI NFS roots with
make-fai-nfsroot. When I tried to install a Squeeze machine using the
newly created NFS roots, the installation failed due to dpkg-configure
failing for emacs23. The emacs-install script failed to byte-compile
some of the emacs lisp scripts due to a missing dependency. The
problem was, that in /target/usr/lib/emacs23/site-lisp/cedet-contrib
all the .el were present so that emacs-install tried to byte-compile
these files. This failed since the .el files from the package semantic
were missing, normally cedet-contrib has a depency on the package
semantic, so the problem was rather mysterious.

I tried to debug the problem and was wondering where the cedet-contrib
.el files came from even though the package wasn't yet installed. dpkg
-S said that it didn't install any of these files with any
package. Since I also checked that we hadn't checked in any of these
emacs lisp files to our config CVS, I figured out the .el must come
from somewhere else.

It turned out, that these files came from a previous installation on
this machine which where still present since setup-storage failed to
create the filesystems on the disk so that the files from the old
installation where still present. setup-storage failed due a grave bug
in Debian [1].

What made the problem difficult to debug was the fact setup-storage
or, more precisely, the partition script created by setup-storage did
not fail during FAI_INSTALL even though mkfs.ext4 returned with exit
code 1.

Since I am not that familiar with setup-storage yet, I'm wondering
whether setup-storage should actually fail in case any of the commands
executed by it do not return a zero exit status. Can anyone tell me
whether this is the case? If not, I think this is a bug in
setup-storage which should be fixed. FAI_INSTALL should always fail in
case any of the commands for setting up the partitions fail.


Regards,

Adrian

[1] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=583551


More information about the linux-fai-devel mailing list