MTV-2208 | Change disk sharing status on vCenter, migration plan don'…#4289
Conversation
…t detect the change Resolves: MTV-2208 When a disk sharing status is changed on vCenter from Multi-Write to nosharing, refreshing the migration plan did not detect the change and clear the warning condition. The plan would continue to show a warning about missing shared disks PVC even though the disk was no longer shared. This fix ensures that when SharedDisks validation passes (ok=true), any existing shared disk warning conditions for that VM are explicitly cleared. This allows the plan status to update correctly when disk sharing status changes on vCenter. The fix tracks VMs that pass shared disk validation and explicitly deletes both SharedWarnDisks and SharedDisks conditions for those VMs after validation. Signed-off-by: Gwen Casey <gcasey@redhat.com>
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #4289 +/- ##
=========================================
- Coverage 15.45% 8.29% -7.17%
=========================================
Files 112 461 +349
Lines 23377 52265 +28888
=========================================
+ Hits 3613 4333 +720
- Misses 19479 47550 +28071
- Partials 285 382 +97
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:
|
mnecas
left a comment
There was a problem hiding this comment.
If we don't detect the changes please take a look at the inventory.
pkg/controller/plan/validation.go
Outdated
There was a problem hiding this comment.
Each reconcile starts with clean list of validations and we add to that list. We don't need t odo any cleanup.
|
This kind of reminds me of #3369. Do inventory updates include disk sharing status? And if I understand Martin correctly, all these validations are always calculated from the inventory state, so the code to remove conditions won't really have any effect. |
…t detect the change Resolves: MTV-2208 When disk sharing status changes on vCenter from Multi-Write to nosharing, the migration plan should detect the change and clear the warning condition. This fix relies on the condition staging mechanism to automatically remove conditions that aren't re-added during validation. Added logging to track inventory updates and validation results for debugging. Removed explicit condition deletion code as it's handled by condition staging. Signed-off-by: Gwen Casey <gcasey@redhat.com>
Signed-off-by: Gwen Casey <gcasey@redhat.com>
|



…t detect the change
Resolves: MTV-2208
When a disk sharing status is changed on vCenter from Multi-Write to nosharing, refreshing the migration plan did not detect the change and clear the warning condition. The plan would continue to show a warning about missing shared disks PVC even though the disk was no longer shared.
This fix ensures that when SharedDisks validation passes (ok=true), any existing shared disk warning conditions for that VM are explicitly cleared. This allows the plan status to update correctly when disk sharing status changes on vCenter.
The fix tracks VMs that pass shared disk validation and explicitly deletes both SharedWarnDisks and SharedDisks conditions for those VMs after validation.