Skip to content

Avoid sending SIGUSR1 when ComputeDomain update only removes nodes #913

@AkshatDudeja77

Description

@AkshatDudeja77

While reading IMEXDaemonUpdateLoopWithDNSNames in compute-domain-daemon/main.go, I noticed the TODO suggesting that we might skip sending SIGUSR1 to the IMEX daemon when the updated daemon set only removes nodes:

// TODO: review skipping this also if the new set of IP addresses only strictly removes
// addresses compared to the old set (then we don't need to force the daemon to re-resolve & re-connect).

Currently UpdateDNSNameMappings() only returns a boolean indicating whether the mapping changed, so the caller cannot distinguish between:

  • nodes being added
  • nodes being removed
  • both

As a result the loop always sends SIGUSR1 whenever the mapping changes.

One possible approach could be extending UpdateDNSNameMappings() to compute the diff between the previous and new ipToDNSName maps, allowing the caller to detect additions vs removals and skip the signal when the update only removes nodes.

Before experimenting with a change here, I wanted to check whether this optimization is still desirable, or if there are reasons the current behavior is preferred.

Metadata

Metadata

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

Status
Backlog

Relationships

None yet

Development

No branches or pull requests

Issue actions