From aeaf1b94ba139e24e61f9e976478779de5e982f5 Mon Sep 17 00:00:00 2001 From: jbjohnso Date: Wed, 7 May 2008 13:24:50 +0000 Subject: [PATCH] -Have discovery not force the 64-bit feature of lm enabled processors if the administrator has said to ignore it git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@1302 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server-2.0/lib/xcat/plugins/nodediscover.pm | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/xCAT-server-2.0/lib/xcat/plugins/nodediscover.pm b/xCAT-server-2.0/lib/xcat/plugins/nodediscover.pm index e8d00c97b..3ae0fad92 100644 --- a/xCAT-server-2.0/lib/xcat/plugins/nodediscover.pm +++ b/xCAT-server-2.0/lib/xcat/plugins/nodediscover.pm @@ -103,8 +103,17 @@ sub process_request { } } if (defined($request->{arch})) { + #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); - $typetab->setNodeAttribs($node,{arch=>$request->{arch}->[0]}); + if ($request->{arch}->[0] =~ /x86_64/) { + (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 + } + } else { + $typetab->setNodeAttribs($node,{arch=>$request->{arch}->[0]}); + } } if (defined($request->{mac})) { my $mactab = xCAT::Table->new("mac",-create=>1);