Skip to content

PCP-6608: cluster-api-provider-maas wipes API server FQDN empty IP set persisted to MAAS DNS when CP machine is transiently powered off, hash-cached so no self-recovery#340

Merged
AmitSahastra merged 6 commits into
spectro-release-4.9from
PCP-6608-4.9
May 15, 2026
Merged

PCP-6608: cluster-api-provider-maas wipes API server FQDN empty IP set persisted to MAAS DNS when CP machine is transiently powered off, hash-cached so no self-recovery#340
AmitSahastra merged 6 commits into
spectro-release-4.9from
PCP-6608-4.9

Conversation

@AmitSahastra

Copy link
Copy Markdown
Contributor

No description provided.

…et persisted to MAAS DNS when CP machine is transiently powered off, hash-cached so no self-recovery
- Remove empty-IP guard from updateResourceIPs helper; guard belongs in
  reconcileDNSAttachments where intent is known, not in a shared helper
  that must support intentional clearing (deprovisioning)
- Deduplicate runningIpAddresses before hashing so the annotation always
  represents the applied IP set, consistent with updateResourceIPs set
  semantics — prevents spurious re-syncs if duplicate IPs appear
- Add IsDriftDetected edge-case tests: duplicate desired IPs and empty
  strings in desired are correctly handled without false drift signals
Fix #2 - last CP deletion leaves stale DNS:
  Track existingCPCount (CPs without DeletionTimestamp) separately.
  Preserve DNS only when existingCPCount > 0 (transient power-off flap).
  When existingCPCount == 0 (all CPs absent or pending deletion), fall
  through to clear DNS so stale records don't persist after a rolling
  replacement or scale-down.

Tests (#4, #5, #6):
  - CP with DeletionTimestamp: excluded from existingCPCount, DNS cleared
  - CP running but no ExternalIP: existingCPCount>0, DNS preserved
    (covers preferred-subnet mismatch code path)
  - GetDNSResource error: error propagated to caller
  - Updated "no CP machines" assertion to reflect new DNS-clear behaviour
@AmitSahastra AmitSahastra changed the title Pcp 6608 4.9 PCP-6608: cluster-api-provider-maas wipes API server FQDN empty IP set persisted to MAAS DNS when CP machine is transiently powered off, hash-cached so no self-recovery May 15, 2026
@AmitSahastra AmitSahastra merged commit cd0b7bb into spectro-release-4.9 May 15, 2026
4 checks passed
@AmitSahastra AmitSahastra deleted the PCP-6608-4.9 branch May 15, 2026 13:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants