[I have written a different mail to Brian off-list in between.]
Brian Kroth <[email protected]> wrote:
> I'm running into this issue too, but the patches didn't help. There's
> also a Prototype mismatch error dumped out by perl, but that doesn't
> seem to be related from my reading so far. Attached is some debug
> output.
>
> In my case there's an existing disk structure and a preserve_reinstall
> in the disk_config, but there's also the initial flag on boot, so it
> should just wipe it and start over. Instead it's bailing on some sort
> of cmd processing sanity check.
There's something seriously wrong going on with setup-storage. I took your
config and modified some lines. For example:
vg_system-fscache /mtvar/cache/mt2fscache 2G-3G ext4
rw,errors=panic,relatime,user_xattr
I removed any 'strange' stuff like tune- and create-opts and also changed
some names. This results in:
'Cannot satisfy pre-depends for true: [...], self_cleared_fscache,
self_cleared_local.hd, [...]'
As I have modified the names in the diskconfig 'fscache' must be the name of
the logical volume. However I cannot find a place where such a pre-depend is
set[1]. The closest thing is 'self_cleared_/dev/$vg/$lv' and this pre-depend
_is_ available ('self_cleared_/dev/vg_system/fscache',
'self_cleared_/dev/vg_system/local.hd').
a) This is totally correct, but nobody provides 'self_cleared_$lv'.
b) Something is wrong, this pre-depend should not exist.
c) ?
If a) is true, then I think there's another bug if you decide to name two LVs
in two different volume groups the same way. What does self_cleared_$lv refer
to then?
I'm currently experimenting with this attached patch, which simply logs and
ignores any 'self_cleared_[a-z.]' dependencies. This makes the resolver finish
successfully, but afterwards there's this little gem:
wipefs -a vg_system/fscache
Command had non-zero exit code
Erm. 'vg_system/fscache'??? The previous command was 'wipefs -a /dev/sda1'.
wipefs requires a device name as it's argument. Where did '/dev/' go?
bye
thomas
[1] Well it could be 'join(",self_cleared_", @{
$FAI::current_dev_children{"/dev/$vg/$lv"} })'
but I haven't looked into what this variable is resulting in yet.
--- vanilla/Commands.pm 2012-06-25 17:43:00.000000000 +0200
+++ patched/Commands.pm 2012-08-22 18:17:05.551666376 +0200
@@ -1333,9 +1333,16 @@
}
my $all_matched = 1;
if (defined($FAI::commands{$i}{pre})) {
- foreach (split(/,/, $FAI::commands{$i}{pre})) {
- my $cur = $_;
- next if scalar(grep(m{^$cur$}, @pre_deps));
+ COMMAND:
+ foreach my $cur (split(/,/, $FAI::commands{$i}{pre})) {
+ # test if all requirements have been fulfilled
+ if ( scalar(grep(m{^$cur$}, @pre_deps)) != 0 ) {
+ next COMMAND;
+ };
+ if ( $cur =~ /^self_cleared_[a-zA-Z0-9.]+$/ ) {
+ print "WARNING: command " . $FAI::commands{$i}{cmd} . " requires
$cur (ignored)\n";
+ next COMMAND;
+ }
$all_matched = 0;
last;
}
@@ -1350,6 +1357,10 @@
$pushed = $FAI::n_c_i;
}
elsif ($i == $pushed) {
+ print "DEBUG: Available pre-depends\n";
+ for my $state (@pre_deps) {
+ print " - $state\n";
+ }
die "Cannot satisfy pre-depends for " . $FAI::commands{$i}{cmd} . ": " .
$FAI::commands{$i}{pre} . " -- system left untouched.\n";
}