diff --git a/xCAT-server/lib/xcat/plugins/profilednodes.pm b/xCAT-server/lib/xcat/plugins/profilednodes.pm index 5b60e5b5c..6f21b0d54 100644 --- a/xCAT-server/lib/xcat/plugins/profilednodes.pm +++ b/xCAT-server/lib/xcat/plugins/profilednodes.pm @@ -1002,15 +1002,6 @@ sub findme{ } my @nodelist = keys %hostinfo_dict; - xCAT::MsgUtils->message('S', "Call nodemgmt plugins.\n"); - $retref = xCAT::Utils->runxcmd({command=>["kitnodeadd"], node=>\@nodelist}, $request_command, 0, 1); - $retstr = get_cmd_return($retref); - xCAT::MsgUtils->message('S', "The return message of running kitnodeadd: $retstr"); - - $retref = xCAT::Utils->runxcmd({command=>["kitnodefinished"], node=>\@nodelist}, $request_command, 0, 1); - $retstr = get_cmd_return($retref); - xCAT::MsgUtils->message('S', "The return message of running kitnodefinished: $retstr"); - # call discover to notify client. xCAT::MsgUtils->message('S', "Call discovered request.\n"); @@ -1024,6 +1015,15 @@ sub findme{ xCAT::MsgUtils->message('S', "Warning: Failed to run command discovered for mac $mac. Details: $retstr"); } + xCAT::MsgUtils->message('S', "Call nodemgmt plugins.\n"); + $retref = xCAT::Utils->runxcmd({command=>["kitnodeadd"], node=>\@nodelist}, $request_command, 0, 1); + $retstr = get_cmd_return($retref); + xCAT::MsgUtils->message('S', "The return message of running kitnodeadd: $retstr"); + + $retref = xCAT::Utils->runxcmd({command=>["kitnodefinished"], node=>\@nodelist}, $request_command, 0, 1); + $retstr = get_cmd_return($retref); + xCAT::MsgUtils->message('S', "The return message of running kitnodefinished: $retstr"); + # Set discovered flag. my $nodegroupstr = $hostinfo_dict{$nodelist[0]}{"groups"}; my $nodelstab = xCAT::Table->new('nodelist',-create=>1);