Fix problem where hot takeover failed to completely kill off discovery worker
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@15960 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
		@@ -590,12 +590,14 @@ sub do_udp_service { #This function opens up a UDP port
 | 
			
		||||
  my $udppidfile;
 | 
			
		||||
  my $retry=1;
 | 
			
		||||
  my $socket;
 | 
			
		||||
  my $discopid = $args{discopid};
 | 
			
		||||
  $SIG{USR2} = sub { 
 | 
			
		||||
	if ($socket) {
 | 
			
		||||
		#only clear out pid file when we still have socket.
 | 
			
		||||
      		unlink("/var/run/xcat/udpservice.pid"); close($socket); $quit=1; $socket=0;
 | 
			
		||||
       		xCAT::MsgUtils->message("S","xcatd udp service $$ quiescing");
 | 
			
		||||
	}
 | 
			
		||||
	kill(15,$discopid);
 | 
			
		||||
	};
 | 
			
		||||
	if ($inet6support) {
 | 
			
		||||
	  $socket = IO::Socket::INET6->new(LocalPort => $port,
 | 
			
		||||
@@ -913,7 +915,7 @@ unless ($pid_UDP) {
 | 
			
		||||
  	xexit(0);
 | 
			
		||||
  }
 | 
			
		||||
  close($udpbroker);
 | 
			
		||||
  do_udp_service(discoctl=>$discoctl);
 | 
			
		||||
  do_udp_service(discoctl=>$discoctl,discopid=>$pid_disco);
 | 
			
		||||
  xexit(0);
 | 
			
		||||
}
 | 
			
		||||
close($sslctl);
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user