-Put in some early bailout on detectable missing storage devices

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@6638 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
jbjohnso 2010-07-02 19:09:49 +00:00
parent 39484a62a7
commit e82d2d1f66

View File

@ -153,6 +153,7 @@ sub get_filepath_by_url { #sadly, libvirt has opted for the 'enterprisey' way li
return $_->get_path();
}
}
return undef;
}
sub get_path_for_nfsuri {
my $diskname = shift;
@ -254,6 +255,9 @@ sub build_diskstruct {
$diskhash->{source}->{dev} = substr($disk_parts[0], 4);
} elsif ($disk_parts[0] =~ m/^nfs:\/\/(.*)$/) {
$diskhash->{source}->{file} = get_filepath_by_url($disk_parts[0],$diskhash->{target}->{dev}); #"/var/lib/xcat/vmnt/nfs_".$1."/$node/".$diskhash->{target}->{dev};
unless ($diskhash->{source}->{file}) {
die "Unable to find ".$diskhash->{target}->{dev}." at ".$disk_parts[0];
}
} else {
$diskhash->{source}->{file} = $disk_parts[0];
}