-Add nodetype.supportedarchs nodetype column and have discovery populate it
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@4124 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
parent
3b65386dfb
commit
754a698d60
@ -380,7 +380,7 @@ noderes => {
|
||||
},
|
||||
},
|
||||
nodetype => {
|
||||
cols => [qw(node os arch profile nodetype comments disable)],
|
||||
cols => [qw(node os arch profile supportedarchs nodetype comments disable)],
|
||||
keys => [qw(node)],
|
||||
table_desc => 'A few hardware and software characteristics of the nodes.',
|
||||
descriptions => {
|
||||
@ -388,6 +388,7 @@ nodetype => {
|
||||
os => 'The operating system deployed on this node. Valid values: AIX, rh*, centos*, fedora*, sles* (where * is the version #).',
|
||||
arch => 'The hardware architecture of this node. Valid values: x86_64, ppc64, x86, ia64.',
|
||||
profile => 'Either the name of an xCAT osimage definition or a pointer to a kickstart or autoyast template to use for OS deployment of this node.',
|
||||
supportedarchs => 'Comma delimited list of architectures this node can execute.',
|
||||
nodetype => 'A comma-delimited list of characteristics of this node. Valid values: blade, vm (virtual machine), lpar, osi (OS image), hmc, fsp, ivm, bpa, mm, rsa, switch.',
|
||||
comments => 'Any user-written notes.',
|
||||
disable => "Set to 'yes' or '1' to comment out this row.",
|
||||
@ -900,6 +901,10 @@ my @nodeattrs = (
|
||||
{attr_name => 'arch',
|
||||
tabentry => 'nodetype.arch',
|
||||
access_tabentry => 'nodetype.node=attr:node',
|
||||
},
|
||||
{attr_name => 'supportedarchs',
|
||||
tabentry => 'nodetype.supportedarchs',
|
||||
access_tabentry => 'nodetype.node=attr:node',
|
||||
},
|
||||
{attr_name => 'os',
|
||||
tabentry => 'nodetype.os',
|
||||
|
@ -103,13 +103,19 @@ 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']);
|
||||
unless ($nent and ($nent->{arch} =~ /x86/)) { #If already an x86 variant, do not change
|
||||
$typetab->setNodeAttribs($node,{arch=>$request->{arch}->[0]});
|
||||
(my $nent) = $typetab->getNodeAttribs($node,['arch','supportedarchs']);
|
||||
if ($nent and ($nent->{arch} =~ /x86/)) { #If already an x86 variant, do not change
|
||||
unless ($nent and $nent->{supportedarchs} =~ /x86_64/) {
|
||||
$typetab->setNodeAttribs($node,{supportedarchs=>"x86,x86_64"});
|
||||
}
|
||||
} else {
|
||||
$typetab->setNodeAttribs($node,{arch=>$request->{arch}->[0],supportedarchs=>"x86,x86_64"});
|
||||
#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]});
|
||||
unless ($nent and $nent->{supportedarchs} eq $request->{arch}->[0] and $nent->{arch} eq $request->{arch}->[0]) {
|
||||
$typetab->setNodeAttribs($node,{arch=>$request->{arch}->[0],supportedarchs=>$request->{arch}->[0]});
|
||||
}
|
||||
}
|
||||
my $currboot='';
|
||||
$nrtab = xCAT::Table->new('noderes'); #Attempt to check and set if wrong the netboot method on discovery, if admin omitted
|
||||
|
Loading…
Reference in New Issue
Block a user