mirror of
				https://github.com/xcat2/xcat-core.git
				synced 2025-11-03 21:02:34 +00:00 
			
		
		
		
	defect 3750
This commit is contained in:
		@@ -6,6 +6,7 @@ use Socket;
 | 
			
		||||
use File::Copy;
 | 
			
		||||
use Getopt::Long;
 | 
			
		||||
use xCAT::MsgUtils;
 | 
			
		||||
use xCAT::ServiceNodeUtils;
 | 
			
		||||
 | 
			
		||||
use xCAT::TableUtils qw(get_site_attribute);
 | 
			
		||||
my $addkcmdlinehandled;
 | 
			
		||||
@@ -210,6 +211,7 @@ sub preprocess_request {
 | 
			
		||||
   my $callback1 = shift;
 | 
			
		||||
   my $command = $req->{command}->[0];
 | 
			
		||||
   my $sub_req = shift;
 | 
			
		||||
   my $nodes = $req->{node};
 | 
			
		||||
   my @args=();
 | 
			
		||||
   if (ref($req->{arg})) {
 | 
			
		||||
       @args=@{$req->{arg}};
 | 
			
		||||
@@ -254,10 +256,22 @@ sub preprocess_request {
 | 
			
		||||
        return;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
   #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)) {
 | 
			
		||||
      # check for  computenodes and servicenodes from the noderange, if so error out
 | 
			
		||||
       my @SN;
 | 
			
		||||
       my @CN;
 | 
			
		||||
       xCAT::ServiceNodeUtils->getSNandCPnodes(\@$nodes, \@SN, \@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];
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user