Have NodeRange make more assurances that it will not be caching data upon explicit request
xcatd explicitly has noderange redo cache if client has a <noderange> element. This distinguishes it from 'getpostscript' type commands. git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@12734 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
parent
f38190c129
commit
43d4ca3b8f
@ -32,13 +32,13 @@ my $grptab;
|
||||
|
||||
#my $nodeprefix = "node";
|
||||
my @allnodeset;
|
||||
my $allnodesetstamp=0;
|
||||
my %allnodehash;
|
||||
my @grplist;
|
||||
my $didgrouplist;
|
||||
my $glstamp=0;
|
||||
my $allnodesetstamp=0;
|
||||
my $allgrphashstamp=0;
|
||||
my %allgrphash;
|
||||
my $allgrphashstamp;
|
||||
my $retaincache=0;
|
||||
my $recurselevel=0;
|
||||
|
||||
@ -448,7 +448,10 @@ sub retain_cache { #A semi private operation to be used *ONLY* in the interestin
|
||||
$retaincache=shift;
|
||||
unless ($retaincache) { #take a call to retain_cache(0) to also mean that any existing
|
||||
#cache must be zapped
|
||||
if ($nodelist) { $nodelist->_clear_cache(); }
|
||||
if ($nodelist) { $nodelist->_refresh_cache(); }
|
||||
$glstamp=0;
|
||||
$allnodesetstamp=0;
|
||||
$allgrphashstamp=0;
|
||||
undef $nodelist;
|
||||
@allnodeset=();
|
||||
%allnodehash=();
|
||||
|
@ -986,6 +986,7 @@ sub plugin_command {
|
||||
if ($req->{node}) {
|
||||
@nodes = @{$req->{node}};
|
||||
} elsif ($req->{noderange} and $req->{noderange}->[0]) {
|
||||
xCAT::NodeRange::retain_cache(0); #if the request has a 'noderange' element, take the performance hit for the sake of freshness
|
||||
@nodes = noderange($req->{noderange}->[0]);
|
||||
if (nodesmissed) {
|
||||
my $rsp = {errorcode=>1,error=>"Invalid nodes and/or groups in noderange: ".join(',',nodesmissed)};
|
||||
@ -1716,7 +1717,7 @@ sub service_connection {
|
||||
if (not defined $bytesread and $! == EAGAIN) { next; } #
|
||||
last;
|
||||
}
|
||||
my $flags=fcntl($sock,F_GETFL,0);
|
||||
$flags=fcntl($sock,F_GETFL,0);
|
||||
$flags &= ~O_NONBLOCK; #now we want *print* to be blocking IO
|
||||
fcntl($sock,F_SETFL,$flags);
|
||||
$request .= $line;
|
||||
@ -1765,6 +1766,7 @@ sub service_connection {
|
||||
} elsif ($cmd_handlers{$req->{command}->[0]}) {
|
||||
plugin_command($req,$sock,\&convey_response);
|
||||
} elsif ($req->{command}->[0] eq "noderange" and $req->{noderange}) {
|
||||
xCAT::NodeRange::retain_cache(0); #if the request has a 'noderange' element, take the performance hit for the sake of freshness
|
||||
my @nodes = noderange($req->{noderange}->[0]);
|
||||
my %resp;
|
||||
if (nodesmissed) {
|
||||
|
Loading…
Reference in New Issue
Block a user