Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MTV-2093 | Sort the disks by bus #1374

Merged
merged 1 commit into from
Feb 28, 2025
Merged

MTV-2093 | Sort the disks by bus #1374

merged 1 commit into from
Feb 28, 2025

Conversation

mnecas
Copy link
Member

@mnecas mnecas commented Feb 24, 2025

Issue: When running a migration of a VM which has various bus controllers the PVs are not populated by correct disk. This causes that some larger disks are in small PVs.
This issue happens due to the libvirt domain-VMware API missmatch. The virt-v2v is outputing the disks in order as they are in the libvirt domain but Forklift is using the order from API and sorting the disks by key. The libvirt is sorted in order of devices SCSI, SATA and IDE wheras sorting by key from VMware API results in order IDE, SATA and SCSI.

Fix: Gather information about the disk busses and sort the disks by SCSI, SATA and IDE. And within each of these categories we sort by the key from lower to higer.

Ref: https://issues.redhat.com/browse/MTV-2093

@mnecas mnecas requested a review from yaacov as a code owner February 24, 2025 07:08
@codecov-commenter
Copy link

codecov-commenter commented Feb 24, 2025

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

Codecov Report

Attention: Patch coverage is 20.00000% with 68 lines in your changes missing coverage. Please review.

Project coverage is 15.48%. Comparing base (f1fe5d0) to head (1ae2ae7).
Report is 26 commits behind head on main.

Files with missing lines Patch % Lines
pkg/controller/provider/container/vsphere/model.go 0.00% 67 Missing ⚠️
pkg/controller/plan/adapter/vsphere/builder.go 94.44% 1 Missing ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1374      +/-   ##
==========================================
+ Coverage   15.45%   15.48%   +0.02%     
==========================================
  Files         112      112              
  Lines       23377    23773     +396     
==========================================
+ Hits         3613     3681      +68     
- Misses      19479    19807     +328     
  Partials      285      285              
Flag Coverage Δ
unittests 15.48% <20.00%> (+0.02%) ⬆️

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.

@mnecas mnecas force-pushed the MTV-2093 branch 4 times, most recently from 2a7ee71 to 522736c Compare February 25, 2025 01:22
Copy link
Member

@yaacov yaacov left a comment

Choose a reason for hiding this comment

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

lgtm,

p.s.
do you want to add some tests to make sure, future us will not refactor this sorting away because they are not needed

Issue: When running a migration of a VM which has various bus
controllers the PVs are not populated by correct disk. This causes that
some larger disks are in small PVs.
This issue happens due to the libvirt domain-VMware API missmatch.
The virt-v2v is outputing the disks in order as they are in the libvirt
domain but Forklift is using the order from API and sorting the disks by
key. The libvirt is sorted in order of devices SCSI, SATA and IDE wheras
sorting by key from VMware API results in order IDE, SATA and SCSI.

Fix: Gather information about the disk busses and sort the disks by
SCSI, SATA and IDE. And within each of these categories we sort by the
key from lower to higer.

Ref: https://issues.redhat.com/browse/MTV-2093

Signed-off-by: Martin Necas <[email protected]>
@mnecas mnecas merged commit d16acd6 into kubev2v:main Feb 28, 2025
14 of 16 checks passed
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.

3 participants