For the places that open site table to read attributes, change to call xCAT::Utils->get_site_attribute instead
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@12902 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
parent
feef5d45d7
commit
5f4c465f97
@ -3215,15 +3215,19 @@ sub nodeSet {
|
||||
$userId =~ tr/a-z/A-Z/;
|
||||
|
||||
# Get install directory and domain from site table
|
||||
my $siteTab = xCAT::Table->new('site');
|
||||
my $installDirHash = $siteTab->getAttribs( { key => "installdir" }, 'value' );
|
||||
my $installDir = $installDirHash->{'value'};
|
||||
my $domainHash = $siteTab->getAttribs( { key => "domain" }, 'value' );
|
||||
my $domain = $domainHash->{'value'};
|
||||
my $masterHash = $siteTab->getAttribs( { key => "master" }, 'value' );
|
||||
my $master = $masterHash->{'value'};
|
||||
my $xcatdPortHash = $siteTab->getAttribs( { key => "xcatdport" }, 'value' );
|
||||
my $xcatdPort = $xcatdPortHash->{'value'};
|
||||
#my $siteTab = xCAT::Table->new('site');
|
||||
#my $installDirHash = $siteTab->getAttribs( { key => "installdir" }, 'value' );
|
||||
my @entries = xCAT::Utils->get_site_attribute("installdir");
|
||||
my $installDir = $entries[0];
|
||||
#my $domainHash = $siteTab->getAttribs( { key => "domain" }, 'value' );
|
||||
@entries = xCAT::Utils->get_site_attribute("domain");
|
||||
my $domain = $entries[0];
|
||||
#my $masterHash = $siteTab->getAttribs( { key => "master" }, 'value' );
|
||||
@entries = xCAT::Utils->get_site_attribute("master");
|
||||
my $master = $entries[0];
|
||||
#my $xcatdPortHash = $siteTab->getAttribs( { key => "xcatdport" }, 'value' );
|
||||
@entries = xCAT::Utils->get_site_attribute("xcatdport");
|
||||
my $xcatdPort = $entries[0];
|
||||
|
||||
# Get node OS, arch, and profile from 'nodetype' table
|
||||
@propNames = ( 'os', 'arch', 'profile' );
|
||||
@ -4304,9 +4308,10 @@ sub updateNode {
|
||||
$userId =~ tr/a-z/A-Z/;
|
||||
|
||||
# Get install directory
|
||||
my $siteTab = xCAT::Table->new('site');
|
||||
my $installDirHash = $siteTab->getAttribs( { key => "installdir" }, 'value' );
|
||||
my $installDir = $installDirHash->{'value'};
|
||||
#my $siteTab = xCAT::Table->new('site');
|
||||
#my $installDirHash = $siteTab->getAttribs( { key => "installdir" }, 'value' );
|
||||
my @entries = xCAT::Utils->get_site_attribute("installdir");
|
||||
my $installDir = $entries[0];
|
||||
|
||||
# Get host IP and hostname from /etc/hosts
|
||||
my $out = `cat /etc/hosts | grep $node`;
|
||||
@ -4636,4 +4641,4 @@ sub listTree {
|
||||
} # End of foreach LPAR
|
||||
} # End of foreach CEC
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user