diff --git a/xCAT-server/lib/xcat/plugins/anaconda.pm b/xCAT-server/lib/xcat/plugins/anaconda.pm index 41ddb29a3..1ed0c468e 100644 --- a/xCAT-server/lib/xcat/plugins/anaconda.pm +++ b/xCAT-server/lib/xcat/plugins/anaconda.pm @@ -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 diff --git a/xCAT-server/lib/xcat/plugins/debian.pm b/xCAT-server/lib/xcat/plugins/debian.pm index 6908d4188..96225a518 100644 --- a/xCAT-server/lib/xcat/plugins/debian.pm +++ b/xCAT-server/lib/xcat/plugins/debian.pm @@ -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 diff --git a/xCAT-server/lib/xcat/plugins/pxe.pm b/xCAT-server/lib/xcat/plugins/pxe.pm index 0e69e63d7..31c7fcab7 100644 --- a/xCAT-server/lib/xcat/plugins/pxe.pm +++ b/xCAT-server/lib/xcat/plugins/pxe.pm @@ -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; diff --git a/xCAT-server/lib/xcat/plugins/toolscenter.pm b/xCAT-server/lib/xcat/plugins/toolscenter.pm index a8ef36118..70c500605 100644 --- a/xCAT-server/lib/xcat/plugins/toolscenter.pm +++ b/xCAT-server/lib/xcat/plugins/toolscenter.pm @@ -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]; } diff --git a/xCAT-server/lib/xcat/plugins/vsmppxe.pm b/xCAT-server/lib/xcat/plugins/vsmppxe.pm index 89e7b1485..46e097522 100644 --- a/xCAT-server/lib/xcat/plugins/vsmppxe.pm +++ b/xCAT-server/lib/xcat/plugins/vsmppxe.pm @@ -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; diff --git a/xCAT-server/lib/xcat/plugins/xnba.pm b/xCAT-server/lib/xcat/plugins/xnba.pm index 8ce1c116a..114283c92 100644 --- a/xCAT-server/lib/xcat/plugins/xnba.pm +++ b/xCAT-server/lib/xcat/plugins/xnba.pm @@ -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,@_); } } diff --git a/xCAT-server/lib/xcat/plugins/yaboot.pm b/xCAT-server/lib/xcat/plugins/yaboot.pm index b90c6df25..73cbd6d5e 100644 --- a/xCAT-server/lib/xcat/plugins/yaboot.pm +++ b/xCAT-server/lib/xcat/plugins/yaboot.pm @@ -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;