fix: Don't process the DPU CR which is being deleted (backport #4125)#4159
fix: Don't process the DPU CR which is being deleted (backport #4125)#4159abvarshney-nv wants to merge 1 commit into
Conversation
When reprovisioning a DPU, reprovision_dpu deletes the DPU CR, but the DPF operator's finalizer keeps the old CR around briefly with a deletionTimestamp and a stale status.phase (specially Ready or Error). On the immediate requeue into WaitingForReady, NICO read that stale Ready/Error and jumped straight to next state — so reprovisioning was never actually observed. get_dpu_phase now maps a set `deletionTimestamp` to `DpuPhase::Deleting`, and `handle_dpf_waiting_for_ready` short-circuits to a wait on Deleting (and on NotFound, the brief gap before the fresh CR is created) before any side-effecting calls. NICO now waits for the operator to delete the old CR and create the new one, then proceeds only when that fresh CR reports Ready. - [ ] **Add** - New feature or capability - [ ] **Change** - Changes in existing functionality - [x] **Fix** - Bug fixes - [ ] **Remove** - Removed features or deprecated functionality - [ ] **Internal** - Internal changes (refactoring, tests, docs, etc.) - [ ] **This PR contains breaking changes** - [x] Unit tests added/updated - [ ] Integration tests added/updated - [ ] Manual testing performed - [ ] No testing required (docs, internal refactor, etc.) (cherry picked from commit a991005)
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
🔐 TruffleHog Secret Scan✅ No secrets or credentials found! Your code has been scanned for 700+ types of secrets and credentials. All clear! 🎉 🕐 Last updated: 2026-07-25 04:53:23 UTC | Commit: 03ef700 |
🔍 Container Scan Summary
Per-CVE detail lives in the per-service |
Backport of #4125 to
release/v2.0.Problem
When reprovisioning a DPU,
reprovision_dpudeletes the DPU CR, but the DPF operator's finalizer keeps the old CR around briefly with adeletionTimestampand a stalestatus.phase(oftenReady, orError). On the immediate requeue intoWaitingForReady, NICO read that staleReady/Errorand jumped straight to the next state — so reprovisioning was never actually observed.Fix
get_dpu_phasenow maps a setdeletionTimestamptoDpuPhase::Deleting.handle_dpf_waiting_for_readyshort-circuits to a wait onDpuPhase::Deleting(and onNotFound, the brief gap before the fresh CR is created) before any side-effecting calls.NICO now waits for the operator to delete the old CR and create the new one, then proceeds only when the fresh CR reports
Ready.Related issues
#4125
Type of Change
Breaking Changes
Testing
Additional Notes