From 214bf456698382a162a2ca1e3f13f6bda059be94 Mon Sep 17 00:00:00 2001 From: linggao Date: Tue, 24 Mar 2009 13:51:56 +0000 Subject: [PATCH] check for nonodestatus in the site table before update the nodelist.status for node install and discovery git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@2964 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/xcat/plugins/destiny.pm | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/xCAT-server/lib/xcat/plugins/destiny.pm b/xCAT-server/lib/xcat/plugins/destiny.pm index e64a095a0..7a8de3d6c 100644 --- a/xCAT-server/lib/xcat/plugins/destiny.pm +++ b/xCAT-server/lib/xcat/plugins/destiny.pm @@ -5,6 +5,7 @@ use Data::Dumper; use xCAT::Utils; use Sys::Syslog; use xCAT::GlobalDef; +use xCAT::Table; use xCAT_monitoring::monitorctrl; use strict; @@ -23,6 +24,17 @@ my $sitetab; my $hmtab; my $tftpdir="/tftpboot"; + +my $nonodestatus=0; +my $sitetab = xCAT::Table->new('site'); +if ($sitetab) { + (my $ref1) = $sitetab->getAttribs({key => 'nonodestatus'}, 'value'); + if ($ref1 and $ref1->{value}) { + if ($ref1->{value} =~ /1|y|Y/) { $nonodestatus=1; } + } +} + + sub handled_commands { return { setdestiny => "destiny", @@ -303,7 +315,7 @@ sub getdestiny { my $ref = $chainents->{$node}->[0]; #$chaintab->getNodeAttribs($node,[qw(currstate chain)]); unless ($ref) { #collect node status for certain states - if (($flag==0) || ($flag==3)) { + if (($nonodestatus==0) && (($flag==0) || ($flag==3))) { my $stat=xCAT_monitoring::monitorctrl->getNodeStatusFromNodesetState("standby", "getdestiny"); #print "node=$node, stat=$stat\n"; if ($stat) { @@ -366,7 +378,7 @@ sub getdestiny { } #setup the nodelist.status - if (($flag==0) || ($flag==3)) { + if (($nonodestatus==0) && (($flag==0) || ($flag==3))) { #print "save status\n"; if (keys(%node_status) > 0) { xCAT_monitoring::monitorctrl::setNodeStatusAttributes(\%node_status, 1); } }