added useNmapfromMN in the site table for nodestat command
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@4493 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
parent
3ba9e95db5
commit
e15a6563a0
@ -595,6 +595,7 @@ site => {
|
||||
" SNsyncfiledir:\tThe directory on the Service Node, where xdcp will copy the files from the MN that will eventually be copied to the compute nodes. Default is /var/xcat/syncfiles.\n\n".
|
||||
" snmpc:\tThe snmp community string that xcat should use when communicating with the switches.\n\n".
|
||||
" svloglocal:\tsyslog on the service node does not get forwarded to the mgmt node - default is 0.\n\n".
|
||||
" useNmapfromMN:\tWhen set to yes, nodestat command should obtain the node status using nmap (if available) from the management node instead of the service node. This will improve the performance in a flat network. Default is no.\n\n".
|
||||
" xcatconfdir:\t(default /etc/xcat)\n\n".
|
||||
" xcatdport:\tThe port used by the xcatd daemon for client/server communication. Default is 3001.\n\n".
|
||||
" xcatiport:\tThe port used by xcatd to receive install status updates from nodes. Default is 3002.\n\n".
|
||||
|
@ -85,8 +85,18 @@ sub preprocess_request
|
||||
my $service = "xcat";
|
||||
my @requests;
|
||||
if ($nodes){
|
||||
if (-x '/usr/bin/nmap' or -x '/usr/local/bin/nmap') {
|
||||
return [$req]; #For now, do not distribute, nodestat seems to lose accuracy and slow down distributed, if using nmap
|
||||
if (-x '/usr/bin/nmap' or -x '/usr/local/bin/nmap') {
|
||||
my $usenmapfrommn=0;
|
||||
my $sitetab = xCAT::Table->new('site');
|
||||
if ($sitetab) {
|
||||
(my $ref) = $sitetab->getAttribs({key => 'useNmapfromMN'}, 'value');
|
||||
if ($ref) {
|
||||
if ($ref->{value} =~ /1|yes|YES|Y|y/) { $usenmapfrommn=1; }
|
||||
}
|
||||
}
|
||||
if ($usenmapfrommn) {
|
||||
return [$req]; #do not distribute, nodestat seems to lose accuracy and slow down distributed, if using nmap
|
||||
}
|
||||
}
|
||||
# find service nodes for requested nodes
|
||||
# build an individual request for each service node
|
||||
|
@ -865,6 +865,8 @@ sub initDB
|
||||
$chtabcmds .= "$::XCATROOT/sbin/chtab key=xcatconfdir site.value=$confdir;";
|
||||
$chtabcmds .=
|
||||
"$::XCATROOT/sbin/chtab key=timezone site.value=$timezone;";
|
||||
$chtabcmds .=
|
||||
"$::XCATROOT/sbin/chtab key=useNmapfromMN site.value=no;";
|
||||
|
||||
if ($::osname eq 'AIX')
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user