Skip to content

MTV-2208 | Change disk sharing status on vCenter, migration plan don'…#4289

Open
gwencasey96 wants to merge 3 commits intokubev2v:mainfrom
gwencasey96:change-disk-sharing-status-vcenter-migration-plan-doesn't-detectr
Open

MTV-2208 | Change disk sharing status on vCenter, migration plan don'…#4289
gwencasey96 wants to merge 3 commits intokubev2v:mainfrom
gwencasey96:change-disk-sharing-status-vcenter-migration-plan-doesn't-detectr

Conversation

@gwencasey96
Copy link
Contributor

…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.

…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-commenter
Copy link

codecov-commenter commented Jan 12, 2026

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

❌ Patch coverage is 0% with 27 lines in your changes missing coverage. Please review.
✅ Project coverage is 8.29%. Comparing base (f1fe5d0) to head (07725c0).
⚠️ Report is 1573 commits behind head on main.

Files with missing lines Patch % Lines
pkg/controller/plan/validation.go 0.00% 14 Missing ⚠️
pkg/controller/plan/adapter/vsphere/validator.go 0.00% 13 Missing ⚠️
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.
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     
Flag Coverage Δ
unittests 8.29% <0.00%> (-7.17%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Member

@mnecas mnecas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we don't detect the changes please take a look at the inventory.

Comment on lines 997 to 999
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Each reconcile starts with clean list of validations and we add to that list. We don't need t odo any cleanup.

@mrnold
Copy link
Contributor

mrnold commented Jan 14, 2026

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>
@sonarqubecloud
Copy link

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.

4 participants

Comments