micro-patch for setup-storage

Thomas Neumann blacky+fai at fluffbunny.de
Tue Aug 28 20:17:30 CEST 2012


Thomas Lange <lange at informatik.uni-koeln.de> wrote:
> Why not use setup-storage without -X which prints all commands without
> executin them?

Okay, I tried running with '-X' now, but there's still a logical bug which
makes it a bit less useful for automated testing[1]. After the commands
have been executed there's a call to Fstab.pm::generate_fstab() which tries
to read the uuid labels of the newly configured partitions. This may or may
not succeed (if the existing disk layout is compatible with the new one,
then you'll get a success, otherwise you'll get exit code '2' (caused by
'/usr/lib/fai/fai-vol_id')

suggested fix:
Skip fstab, crypttab & disk_var.sh generation completely in dry-run mode
or use some fake-values for the uuid-labels and/or labels.

result:
setup-storage's exit code is a reliable indicator if the configuration
is parseable and the dependency resolver was able to compile a properly
ordered list of commands. (Which may or may not be truly 'correct'
 -> LVM/wipefs issue.)

bye
thomas

[1] This also triggers with my 'print'-modification.


More information about the linux-fai mailing list