Uh oh!
There was an error while loading. Please reload this page.
Fix KVM import and list unmanaged VMs - #8445
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@## main #8445 +/- ##
============================================
- Coverage 30.74% 22.98% -7.77% + Complexity 33930 23732 -10198
============================================
Files 5341 5209 -132 Lines 374918 352870 -22048 Branches 54534 50543 -3991 ============================================
- Hits 115286 81100 -34186 - Misses 244374 260108 +15734 + Partials 15258 11662 -3596
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
shwstppr
commented
Jan 4, 2024
@blueorangutan package |
blueorangutan
commented
Jan 4, 2024
@shwstppr a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress. |
blueorangutan
commented
Jan 4, 2024
Packaging result [SF]: ✔️ el7 ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 8202 |
shwstppr
commented
Jan 4, 2024
@blueorangutan test |
blueorangutan
commented
Jan 4, 2024
@shwstppr a [SL] Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests |
blueorangutan
commented
Jan 5, 2024
[SF] Trillian test result (tid-8725)
|
| pools.addAll(primaryDataStoreDao.listByDataCenterId(zone.getId())); | ||
| for (StoragePool pool : pools) { | ||
| if (pool.getPath().endsWith(dsName)) { | ||
| if (StringUtils.containsAny(pool.getPath(), dsName, dsPath)) { |
There was a problem hiding this comment.
aren't we replacing a bug with a bug here (nitpicking maybe but genuine question)path.endswith("bla") is different from StringUtils.containsAny(path, "bla", "blob")
considder paths:
- "bla/blah"
- "bla/blob"
- "bla/bleb"
Neither would match the first condition, and though the first is supposed to match the second condition (as I understand) the other two seem false positives to me.
Am I misinterpreting this @slavkap ?
There was a problem hiding this comment.
Adding to @DaanHoogland's comment, perhaps we can add a condition to keep the current check for non RBD disks? Raising a concern since the Vmware import of unmanaged instances uses the same code
There was a problem hiding this comment.
thanks @DaanHoogland, @nvazquez! I've changed it to check only path vs dsPath. Neither for KVM/VMware we need to check for the datastore name in the primary storage path
| pools.addAll(primaryDataStoreDao.listByDataCenterId(zone.getId())); | ||
| for (StoragePool pool : pools) { | ||
| if (pool.getPath().endsWith(dsName)) { | ||
| if (StringUtils.containsAny(pool.getPath(), dsName, dsPath)) { |
There was a problem hiding this comment.
Adding to @DaanHoogland's comment, perhaps we can add a condition to keep the current check for non RBD disks? Raising a concern since the Vmware import of unmanaged instances uses the same code
Uh oh!
There was an error while loading. Please reload this page.
shwstppr
commented
Jan 9, 2024
@blueorangutan package |
blueorangutan
commented
Jan 9, 2024
@shwstppr a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress. |
1 - Fix of VM insert for VMs with StorPool volumes 2 - Fix of list/insert unmanaged VMs with RBD volumes
blueorangutan
commented
Jan 9, 2024
Packaging result [SF]: ✔️ el7 ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 8251 |
Chech if the pool path contains the datastore path. There is no need to check for the datastore name because for VMware it get the datastore UUID which isn't relevant with the primary storage path in CS
nvazquez
commented
Jan 9, 2024
@blueorangutan package |
blueorangutan
commented
Jan 9, 2024
@nvazquez a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress. |
blueorangutan
commented
Jan 9, 2024
Packaging result [SF]: ✔️ el7 ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 8256 |
nvazquez
left a comment
There was a problem hiding this comment.
LGTM - tested OK on a mixed Vmware+KVM env and observe no regressions on KVM or Vmware import
DaanHoogland
left a comment
There was a problem hiding this comment.
clgtm and did similar tests to @nvazquez (not well communicated but very well tested.) of course we might have missed some corner cases still. Let's merge however.
VM import fixes 1 - Fix of VM insert for VMs with StorPool volumes 2 - Fix of list/insert unmanaged VMs with RBD volumes
Description
This PR fixes part (issues 2 and3) of #8439 and depends on #8433
1 - Fix of VM insert for VMs with StorPool volumes
2 - Fix of the list/insert unmanaged VMs with RBD volumes
Types of changes
Bug Severity
How Has This Been Tested?
manually tested