From caf3b2c9859bc50657dbac197af1745dd4078f28 Mon Sep 17 00:00:00 2001 From: jbjohnso Date: Fri, 9 May 2008 18:45:21 +0000 Subject: [PATCH] -Fix problem where discovery would incorrectly overwrite fields git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@1341 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server-2.0/lib/xcat/plugins/nodediscover.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/xCAT-server-2.0/lib/xcat/plugins/nodediscover.pm b/xCAT-server-2.0/lib/xcat/plugins/nodediscover.pm index 14d3dd49b..4687456d3 100644 --- a/xCAT-server-2.0/lib/xcat/plugins/nodediscover.pm +++ b/xCAT-server-2.0/lib/xcat/plugins/nodediscover.pm @@ -107,7 +107,7 @@ sub process_request { #Set the architecture in nodetype. If 32-bit only x86 or ppc detected, overwrite. If x86_64, only set if either not set or not an x86 family my $typetab=xCAT::Table->new("nodetype",-create=>1); if ($request->{arch}->[0] =~ /x86_64/) { - (my $nent) = $typetab->getNodeAttribs($node,'arch'); + (my $nent) = $typetab->getNodeAttribs($node,['arch']); unless ($nent and ($nent->{arch} =~ /x86/)) { #If already an x86 variant, do not change $typetab->setNodeAttribs($node,{arch=>$request->{arch}->[0]}); #this check is so that if an admin explicitly declares a node 'x86', the 64 bit capability is ignored @@ -117,7 +117,7 @@ sub process_request { } my $currboot=''; $nrtab = xCAT::Table->new('noderes'); #Attempt to check and set if wrong the netboot method on discovery, if admin omitted - (my $rent) = $nrtab->getNodeAttribs($node,'netboot'); + (my $rent) = $nrtab->getNodeAttribs($node,['netboot']); if ($rent and $rent->{'netboot'}) { $currboot=$rent->{'netboot'}; } @@ -142,7 +142,7 @@ sub process_request { my $netn = inet_ntoa(pack("N",$ipn & $mask)); my $hosttag = gethosttag($node,$netn,@ifinfo[1],\%usednames); if ($hosttag) { - (my $rent) = $nrtab->getNodeAttribs($node,'primarynic','nfsserver'); + (my $rent) = $nrtab->getNodeAttribs($node,['primarynic','nfsserver']); unless ($rent and $rent->{primarynic}) { #if primarynic not set, set it to this nic $nrtab->setNodeAttribs($node,{primarynic=>@ifinfo[1]}); }