From 50913eb9b51994c8884977fd939a37de904fd975 Mon Sep 17 00:00:00 2001 From: nott Date: Fri, 2 Mar 2012 15:19:44 +0000 Subject: [PATCH] rmnimimage support for hasn git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@11729 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/xcat/plugins/aixinstall.pm | 31 ++++++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) diff --git a/xCAT-server/lib/xcat/plugins/aixinstall.pm b/xCAT-server/lib/xcat/plugins/aixinstall.pm index c73d80c62..68db5713c 100644 --- a/xCAT-server/lib/xcat/plugins/aixinstall.pm +++ b/xCAT-server/lib/xcat/plugins/aixinstall.pm @@ -5517,8 +5517,17 @@ sub prermnimimage my $nimprime = xCAT::InstUtils->getnimprime(); chomp $nimprime; + # convert to IP + my $nimprimeIP = xCAT::NetworkUtils->getipaddr($nimprime); + chomp $nimprimeIP; + + # check the sharedinstall attr + my $sharedinstall=xCAT::Utils->get_site_attribute('sharedinstall'); + chomp $sharedinstall; + # by default, get MN and all servers my @allsn = (); + my @SFSsn = (); # if sharedinstall=sns then get MN and one SN my @nlist = xCAT::Utils->list_all_nodes; my $sn; my $service = "xcat"; @@ -5526,8 +5535,22 @@ sub prermnimimage { $sn = xCAT::Utils->getSNformattedhash(\@nlist, $service, "MN"); } + + my $SFSdone; foreach my $snkey (keys %$sn) { + # if the SNs are using a shared file system then + # we would only need to remove resources from the MN + # and one SN. + if (($sharedinstall eq "sns") && (!$SFSdone)) { + my $snkeyIP = xCAT::NetworkUtils->getipaddr($snkey); + chomp $snkeyIP; + if ($snkeyIP ne $nimprimeIP) { + push(@SFSsn, $snkey); + push(@SFSsn, $nimprime); + $SFSdone++; + } + } push(@allsn, $snkey); } @@ -5543,8 +5566,12 @@ sub prermnimimage } else { - # do mn and all sn - @servicenodes = @allsn; + if ($sharedinstall eq "sns") { + @servicenodes = @SFSsn; + } else { + # do mn and all sn + @servicenodes = @allsn; + } } #