add check for persistent /var/adm/ras

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@13532 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
nott 2012-08-16 13:20:44 +00:00
parent 641a7eca86
commit 9bde1bf177
2 changed files with 40 additions and 8 deletions

View File

@ -1014,7 +1014,36 @@ sub dolitesetup
}
}
# need list for just this set of nodes!!!
my $nrange;
my @flist;
my @litef;
if (scalar(@nodel) > 0)
{
$nrange = join(',',@nodel);
}
my @flist = xCAT::Utils->runcmd("/opt/xcat/bin/litefile $nrange", -1);
if (scalar(@flist) > 0) {
foreach my $l (@flist) {
my ($j1, $j2, $file) = split /\s+/, $l;
push (@litef, $file);
}
}
my $foundras;
if (scalar(@litef) > 0) {
foreach my $f (@litef) {
chomp $f;
if (($f eq "/var/adm/ras/") || ($f eq "/var/adm/ras/conslog")) {
$foundras++;
}
}
}
if ($foundras) {
my $rsp;
push @{$rsp->{data}}, "One or more nodes is using a persistent \/var\/adm\/ras\/ directory. \nWhen the nodes boot up you will then have to move the conslog file to a \nlocation outside of the persistent directory. (Leaving the conslog \nfile in a persistent directory can occasionally lead to a deadlock situation.) \nThis can be done by using the xdsh command to run swcons on the \ncluster nodes. \n(Ex. xdsh <noderange> \'\/usr\/sbin\/swcons -p \/tmp\/conslog\') \n";
xCAT::MsgUtils->message("W", $rsp, $callback);
}
unless (open(LITETREE, ">$litetreetable"))
{

View File

@ -6839,14 +6839,17 @@ sub updatespot
# if this has a shared_root resource then
# it might need statelite setup
my $rc=xCAT::InstUtils->dolitesetup($image, \%imghash, \@nodelist, $callback, $subreq);
if ($rc eq 1) { # error
my $rsp;
push @{$rsp->{data}}, qq{Could not complete the statelite setup.};
xCAT::MsgUtils->message("E", $rsp, $callback);
return 1;
}
my $sharedinstall=xCAT::Utils->get_site_attribute('sharedinstall');
chomp $sharedinstall;
if ( $sharedinstall eq "sns" ) {
my $rc=xCAT::InstUtils->dolitesetup($image, \%imghash, \@nodelist, $callback, $subreq);
if ($rc eq 1) { # error
my $rsp;
push @{$rsp->{data}}, qq{Could not complete the statelite setup.};
xCAT::MsgUtils->message("E", $rsp, $callback);
return 1;
}
}
}
# Modify the rc.dd-boot script