Repository navigation
fix: clean up first try disks before arch fallback retry - #14376
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #14376 +/- ##
=========================================
Coverage 20.21% 20.21%
- Complexity 20750 20751 +1
=========================================
Files 6426 6426
Lines 580181 580188 +7
Branches 71033 71033
=========================================
+ Hits 117287 117291 +4
- Misses 450180 450183 +3
Partials 12714 12714
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 19495 |
|
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 19496 |
|
@blueorangutan test |
|
@nvazquez a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests |
|
[SF] Trillian test result (tid-17339)
|
RosiKyu
left a comment
There was a problem hiding this comment.
LGTM
Tested on a KVM env (mgmt + 2 EL9 KVM x86 hosts), baseline on a main-based build first, then the PR build (24.0.0-shapeblue22025). No real aarch64 host, so I added a disabled aarch64 cluster with a Down aarch64 host record, an aarch64 copy of the KVM system VM template, and set system.vm.preferred.architecture=aarch64 on the zone.
- Before: destroying the console proxy gives a new v-5-VM with 2 ROOT volumes on device 0 (aarch64 and x86 template) and 6 NICs; every start fails with "XML error: target 'vda' duplicated for disk sources ...".
- After: new console proxy logs "Cleaning up the volumes and NICs allocated for ...", the aarch64 volume and first-try NICs are removed, the proxy gets 1 ROOT + 3 NICs from the x86 template and comes Up.
- Same result for the secondary storage VM.
- Regression: with x86_64 preferred, the console proxy is created on the first try (no cleanup step) and comes Up; a normal user VM deploys fine.
Fixes #14235
When a system vm cant be placed on hosts of the preferred architecture, it retries with the other architecture's template. The first try had already made a root disk and network cards for the vm, and nothing removed them. So the vm ended up with two root disks on the same slot and could not start on any host. This removes the first try's disks and network cards before the retry, for both the secondary storage vm and the console proxy.
Test:
KVM lab with one x86 cluster and one disabled aarch64 cluster, an aarch64 system vm template, and
system.vm.preferred.architecture=aarch64. Destroy the console proxy so a new one is made. It cant be placed on aarch64, so it retries with the x86 template.Also added a unit test for the new cleanup step.
VirtualMachineManagerImplTest,ConsoleProxyManagerImplTest,SecondaryStorageManagerImplTestandSecondaryStorageManagerTestpass.Before: the new console proxy keeps both root disks on slot 0 and every start fails:
After: the aarch64 disk is removed before the retry. The console proxy gets one root disk and starts: