Skip to content

Commit f8ad4c0

Browse files
compute-domain-daemon: skip SIGUSR1 when DNS mapping update only removes nodes (fixes #913)
Signed-off-by: AkshatDudeja77 <akshat.dudeja77@gmail.com>
1 parent 4fc3ff0 commit f8ad4c0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cmd/compute-domain-daemon/main.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -374,7 +374,7 @@ func IMEXDaemonUpdateLoopWithDNSNames(ctx context.Context, controller *Controlle
374374
klog.Infof("shutdown: stop IMEXDaemonUpdateLoopWithDNSNames")
375375
return nil
376376
case daemons := <-controller.GetDaemonInfoUpdateChan():
377-
updated, err := dnsNameManager.UpdateDNSNameMappings(daemons)
377+
oldCount := len(dnsNameManager.ipToDNSName) updated, err := dnsNameManager.UpdateDNSNameMappings(daemons)
378378
if err != nil {
379379
return fmt.Errorf("failed to update DNS name => IP mappings: %w", err)
380380
}
@@ -396,7 +396,7 @@ func IMEXDaemonUpdateLoopWithDNSNames(ctx context.Context, controller *Controlle
396396
// this also if the new set of IP addresses only strictly removes
397397
// addresses compared to the old set (then we don't need to force
398398
// the daemon to re-resolve & re-connect).
399-
if !updated || fresh {
399+
if !updated || fresh || len(dnsNameManager.ipToDNSName) < oldCount {
400400
break
401401
}
402402

0 commit comments

Comments
 (0)