2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-05-31 01:56:39 +00:00

Merge pull request #1253 from daniceexi/stoptftp

issue 1233: try to rekill tftp and add more debug info when failed to…
This commit is contained in:
yangsong 2016-06-03 03:17:33 -05:00
commit c0a5b724b3

View File

@ -1429,8 +1429,13 @@ sub enable_TFTPhpa
foreach my $pid (keys %pids_map) {
if (xCAT::Utils->is_process_exists($pid)) {
$count++;
if($count > 5) {
xCAT::MsgUtils->message("S","ERROR: Can not stop tftp process in 5 seconds.");
if($count == 5) {
my $tftpinfo = `ps axf|grep -v grep|grep in.tftpd`;
xCAT::MsgUtils->message("S","ERROR: Can not stop tftp process $pid [$tftpinfo] in 5 seconds, stop it again.");
system("killall -s KILL in.tftpd");
}
if($count > 10) {
xCAT::MsgUtils->message("S","ERROR: Can not stop tftp process in 10 seconds.");
return 1;
}
sleep 1;