Added check for disk pool and size configuration.
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@11274 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
parent
441198422d
commit
832b4becb1
@ -159,20 +159,23 @@ sub provzlinux {
|
||||
my $profile_diskpool_parm = $profile . "_diskpool";
|
||||
my $profile_eckd_size_parm = $profile . "_eckd_size";
|
||||
my $profile_fba_size_parm = $profile . "_fba_size";
|
||||
my $default_disk_pool;
|
||||
my $default_eckd_size;
|
||||
my $default_fba_size;
|
||||
foreach (@tmp) {
|
||||
# Get disk pool (default)
|
||||
if ( $_ =~ m/default_diskpool=/i ) {
|
||||
$disk_pool = $_;
|
||||
$disk_pool =~ s/default_diskpool=//g;
|
||||
$default_disk_pool = $_;
|
||||
$default_disk_pool =~ s/default_diskpool=//g;
|
||||
}
|
||||
# Get disk size (default)
|
||||
elsif ( $_ =~ m/default_eckd_size=/i ) {
|
||||
$eckd_size = $_;
|
||||
$eckd_size =~ s/default_eckd_size=//g;
|
||||
$default_eckd_size = $_;
|
||||
$default_eckd_size =~ s/default_eckd_size=//g;
|
||||
}
|
||||
elsif ( $_ =~ m/default_fba_size=/i ) {
|
||||
$fba_size = $_;
|
||||
$fba_size =~ s/default_fba_size=//g;
|
||||
$default_fba_size = $_;
|
||||
$default_fba_size =~ s/default_fba_size=//g;
|
||||
}
|
||||
|
||||
# Get profile disk pool (default)
|
||||
@ -190,6 +193,15 @@ sub provzlinux {
|
||||
$fba_size =~ s/$profile_fba_size_parm=//g;
|
||||
}
|
||||
}
|
||||
|
||||
# Use default configuration if profile configuration does not exist
|
||||
if (!$disk_pool || !$eckd_size || !$fba_size) {
|
||||
println( $callback, "$profile configuration for disk pool and size does not exist. Using default configuration." );
|
||||
|
||||
$disk_pool = $default_disk_pool;
|
||||
$eckd_size = $default_eckd_size;
|
||||
$fba_size = $default_fba_size;
|
||||
}
|
||||
|
||||
my $site_tab = xCAT::Table->new('site');
|
||||
my $hash = $site_tab->getAttribs( { key => "installdir" }, 'value' );
|
||||
|
Loading…
Reference in New Issue
Block a user