MTV-4150 | Fix disk transfer completed when importer pod is pending#4286
MTV-4150 | Fix disk transfer completed when importer pod is pending#4286gwencasey96 wants to merge 2 commits intokubev2v:mainfrom
Conversation
1ca8695 to
61122cb
Compare
Resolves: MTV-4150 The Disk Transfer step was being marked as completed when a DataVolume reached Succeeded phase, even if the PVCs were not bound or the importer pod was still pending. This could happen when CSI drivers fail to provision volumes (e.g., nfs.csi.k8s.io issues). This fix adds validation before marking a DataVolume as completed: - Verifies the main PVC is bound - Verifies the prime PVC (if it exists) is bound - Verifies the importer pod (if it exists) is not pending If any of these checks fail, the task is marked as pending instead of completed, preventing Disk Transfer from showing as completed prematurely. Also adds a default case to handle unknown/empty DataVolume phases. Signed-off-by: Gwen Casey <gcasey@redhat.com>
61122cb to
e4c04d7
Compare
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #4286 +/- ##
=========================================
- Coverage 15.45% 8.30% -7.15%
=========================================
Files 112 461 +349
Lines 23377 52273 +28896
=========================================
+ Hits 3613 4342 +729
- Misses 19479 47547 +28068
- Partials 285 384 +99
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Where does the DataVolume get set to Succeeded? From the bug, it looks like the phase is just blank: The patch is kind of hard to read, but I am more wondering if it fixes the wrong symptom. If you have a controller log or something that shows the DataVolume itself is Succeeded can you attach it to the Jira ticket? |
Resolves: MTV-4150 Refactored deeply nested validation code into a helper function (verifyDataVolumeCompletion) to improve readability and maintainability. Added comprehensive diagnostic logging to help diagnose CDI behavior: - Logs DataVolume phase, PVC phase, and pod phase annotation - Logs when validation fails with detailed state information - Helps identify if CDI incorrectly sets DataVolume phase to Succeeded The validation now verifies that: - Main PVC is bound - Prime PVC (if exists) is bound - Importer pod (if exists) is not pending This prevents marking disk transfer as completed when CDI incorrectly reports Succeeded phase (e.g., when importer pod is still waiting for PVC provisioning due to CSI driver issues). Signed-off-by: Gwen Casey <gcasey@redhat.com>
|



Resolves: MTV-4150
The Disk Transfer step was being marked as completed when a DataVolume reached Succeeded phase, even if the PVCs were not bound or the importer pod was still pending. This could happen when CSI drivers fail to provision volumes (e.g., nfs.csi.k8s.io issues).
This fix adds validation before marking a DataVolume as completed:
If any of these checks fail, the task is marked as pending instead of completed, preventing Disk Transfer from showing as completed prematurely.
Also adds a default case to handle unknown/empty DataVolume phases.