From 9bde1bf177f2e0d59a6caee114db65caac25feff Mon Sep 17 00:00:00 2001 From: nott Date: Thu, 16 Aug 2012 13:20:44 +0000 Subject: [PATCH] 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 --- perl-xCAT/xCAT/InstUtils.pm | 29 ++++++++++++++++++++++ xCAT-server/lib/xcat/plugins/aixinstall.pm | 19 ++++++++------ 2 files changed, 40 insertions(+), 8 deletions(-) diff --git a/perl-xCAT/xCAT/InstUtils.pm b/perl-xCAT/xCAT/InstUtils.pm index a1fc58201..f252849e3 100644 --- a/perl-xCAT/xCAT/InstUtils.pm +++ b/perl-xCAT/xCAT/InstUtils.pm @@ -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 \'\/usr\/sbin\/swcons -p \/tmp\/conslog\') \n"; + xCAT::MsgUtils->message("W", $rsp, $callback); + } unless (open(LITETREE, ">$litetreetable")) { diff --git a/xCAT-server/lib/xcat/plugins/aixinstall.pm b/xCAT-server/lib/xcat/plugins/aixinstall.pm index 8434bd397..91966f207 100644 --- a/xCAT-server/lib/xcat/plugins/aixinstall.pm +++ b/xCAT-server/lib/xcat/plugins/aixinstall.pm @@ -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