fix noderegenips scalability problem
This commit is contained in:
		| @@ -106,8 +106,9 @@ sub process_request { | ||||
|      | ||||
|     # Stage1:  pre-run      | ||||
|     if ($command eq 'kitnoderefresh') { | ||||
|         # This is due to once update nicips table, we need remove node's records first and then re-create by run make* commands. | ||||
|         push @commandslist, ['kitnoderemove', '']; | ||||
|         # This is due to once update nicips table, we need remove node's records first and then re-create by run make* commands. If not, old records can't be removed. | ||||
|         push @commandslist, ['makedns', '-d']; | ||||
|         push @commandslist, ['makehosts', '-d']; | ||||
|     } | ||||
|      | ||||
|     # Stage2: run xcat commands | ||||
|   | ||||
| @@ -957,13 +957,13 @@ Usage: | ||||
|         $chaintab->close(); | ||||
|          | ||||
|         # Remove all nodes information | ||||
|         push(@kitcommands, "kitnoderemove"); | ||||
|         push(@kitcommands, "removenodes"); | ||||
|         # Add all nodes information back | ||||
|         push(@kitcommands, "kitnodeadd");   | ||||
|          | ||||
|     } elsif ( $fsp_flag ) { | ||||
|         # Remove all nodes information | ||||
|         push(@kitcommands, "kitnoderemove"); | ||||
|         push(@kitcommands, "removenodes"); | ||||
|         # Add all nodes information back | ||||
|         push(@kitcommands, "kitnodeadd"); | ||||
|     } else { | ||||
| @@ -972,7 +972,17 @@ Usage: | ||||
|  | ||||
|     #10. Call plugins.    | ||||
|     foreach my $command (@kitcommands) { | ||||
|         my $retref = xCAT::Utils->runxcmd({command=>[$command], node=>$nodes, sequential=>[1]}, $request_command, 0, 2); | ||||
|         my $retref; | ||||
|         if ($command eq 'removenodes'){ | ||||
|             # Not run makedns -d as it costs too much time | ||||
|             #setrsp_progress("Updating DNS entries"); | ||||
|             #$retref = xCAT::Utils->runxcmd({command=>["makedns"], node=>$nodes, arg=>['-d']}, $request_command, 0, 2); | ||||
|  | ||||
|             #setrsp_progress("Updating hosts entries"); | ||||
|             $retref = xCAT::Utils->runxcmd({command=>["makehosts"], node=>$nodes, arg=>['-d']}, $request_command, 0, 2); | ||||
|             next; | ||||
|         } | ||||
|         $retref = xCAT::Utils->runxcmd({command=>[$command], node=>$nodes, sequential=>[1]}, $request_command, 0, 2); | ||||
|         my $retstrref = parse_runxcmd_ret($retref); | ||||
|         if ($::RUNCMD_RC != 0){ | ||||
|             setrsp_progress("Warning: failed to call kit commands."); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user