fix for defect 3985
This commit is contained in:
parent
542259583c
commit
4c031e1806
@ -34,6 +34,7 @@ my $httpport="80";
|
||||
my $useflowcontrol="0";
|
||||
|
||||
|
||||
|
||||
sub handled_commands
|
||||
{
|
||||
return {
|
||||
@ -62,7 +63,7 @@ sub preprocess_request
|
||||
my @ents = xCAT::TableUtils->get_site_attribute("sharedtftp");
|
||||
my $site_ent = $ents[0];
|
||||
unless ( defined($site_ent)
|
||||
and ($site_ent =~ /no/i or $site_ent =~ /0/))
|
||||
and ($site_ent eq "no" or $site_ent eq "NO" or $site_ent eq "0"))
|
||||
{
|
||||
|
||||
#unless requesting no sharedtftp, don't make hierarchical call
|
||||
|
@ -77,7 +77,7 @@ sub preprocess_request
|
||||
($sent) = $stab->getAttribs({key => 'sharedtftp'}, 'value');
|
||||
unless ( $sent
|
||||
and defined($sent->{value})
|
||||
and ($sent->{value} =~ /no/i or $sent->{value} =~ /0/))
|
||||
and ($sent->{value} eq "no" or $sent->{value} eq "NO" or $sent->{value} eq "0"))
|
||||
{
|
||||
|
||||
#unless requesting no sharedtftp, don't make hierarchical call
|
||||
|
@ -328,7 +328,7 @@ sub preprocess_request {
|
||||
#my $sent = $stab->getAttribs({key=>'sharedtftp'},'value');
|
||||
my @entries = xCAT::TableUtils->get_site_attribute("sharedtftp");
|
||||
my $t_entry = $entries[0];
|
||||
if ( defined($t_entry) and ($t_entry == 0 or $t_entry =~ /no/i)) {
|
||||
if ( defined($t_entry) and ($t_entry eq "0" or $t_entry eq "no" or $t_entry eq "NO")) {
|
||||
# check for computenodes and servicenodes from the noderange, if so error out
|
||||
my @SN;
|
||||
my @CN;
|
||||
|
@ -68,9 +68,10 @@ sub preprocess_request
|
||||
my @entries = xCAT::TableUtils->get_site_attribute("sharedtftp");
|
||||
my $t_entry = $entries[0];
|
||||
unless ( defined($t_entry)
|
||||
and ($t_entry =~ /no/i or $t_entry =~ /0/))
|
||||
and ($t_entry eq "no" or $t_entry eq "NO" or $t_entry eq "0"))
|
||||
{
|
||||
|
||||
|
||||
#unless requesting no sharedtftp, don't make hierarchical call
|
||||
return [$req];
|
||||
}
|
||||
|
@ -260,7 +260,7 @@ sub preprocess_request {
|
||||
|
||||
my @entries = xCAT::TableUtils->get_site_attribute("sharedtftp");
|
||||
my $t_entry = $entries[0];
|
||||
if ( defined($t_entry) and ($t_entry == 0 or $t_entry =~ /no/i)) {
|
||||
if ( defined($t_entry) and ($t_entry eq "0" or $t_entry eq "no" or $t_entry eq "NO")) {
|
||||
# check for computenodes and servicenodes from the noderange, if so error out
|
||||
my @SN;
|
||||
my @CN;
|
||||
|
@ -348,27 +348,27 @@ sub preprocess_request {
|
||||
#they specify no sharedtftp in site table
|
||||
my @entries = xCAT::TableUtils->get_site_attribute("sharedtftp");
|
||||
my $t_entry = $entries[0];
|
||||
if ( defined($t_entry) and ($t_entry == 0 or $t_entry =~ /no/i)) {
|
||||
if ( defined($t_entry) and ($t_entry eq "0" or $t_entry eq "no" or $t_entry eq "NO")) {
|
||||
# check for computenodes and servicenodes from the noderange, if so error out
|
||||
my @SN;
|
||||
my @CN;
|
||||
xCAT::ServiceNodeUtils->getSNandCPnodes(\@$nodes, \@SN, \@CN);
|
||||
unless (($args[0] eq 'stat') or ($args[0] eq 'enact')) { # mix is ok for these options
|
||||
if ((@SN > 0) && (@CN >0 )) { # there are both SN and CN
|
||||
if ((@SN > 0) && (@CN >0 )) { # there are both SN and CN
|
||||
my $rsp;
|
||||
$rsp->{data}->[0] =
|
||||
"Nodeset was run with a noderange containing both service nodes and compute nodes. This is not valid. You must submit with either compute nodes in the noderange or service nodes. \n";
|
||||
xCAT::MsgUtils->message("E", $rsp, $callback1);
|
||||
return;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$req->{'_disparatetftp'}=[1];
|
||||
if ($req->{inittime}->[0]) {
|
||||
return [$req];
|
||||
}
|
||||
if (@CN >0 ) { # there are computenodes then run on all servicenodes
|
||||
if (@CN >0 ) { # if compute nodes broadcast to all servicenodes
|
||||
return xCAT::Scope->get_broadcast_scope($req,@_);
|
||||
}
|
||||
}
|
||||
|
@ -379,7 +379,8 @@ sub preprocess_request {
|
||||
#if they specify no sharedtftp in site table
|
||||
my @entries = xCAT::TableUtils->get_site_attribute("sharedtftp");
|
||||
my $t_entry = $entries[0];
|
||||
if ( defined($t_entry) and ($t_entry == 0 or $t_entry =~ /no/i)) {
|
||||
|
||||
if ( defined($t_entry) and ($t_entry eq "0" or $t_entry eq "no" or $t_entry eq "NO")) {
|
||||
# check for computenodes and servicenodes from the noderange, if so error out
|
||||
my @SN;
|
||||
my @CN;
|
||||
|
Loading…
Reference in New Issue
Block a user