Repository navigation
Allow preserving duplicate MACs during VM import - #13128
andrijapanicsb wants to merge 3 commits into
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #13128 +/- ##
=========================================
Coverage 19.91% 19.92%
- Complexity 20198 20205 +7
=========================================
Files 6373 6374 +1
Lines 577230 577281 +51
Branches 70696 70702 +6
=========================================
+ Hits 114936 114998 +62
+ Misses 449736 449720 -16
- Partials 12558 12563 +5
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:
|
4621d57 to
e35e8d7
Compare
|
@blueorangutan package |
|
@andrijapanicsb a [SL] Jenkins job has been kicked to build packages. It will be bundled with no SystemVM templates. I'll keep you posted as I make progress. |
e35e8d7 to
8f46ffb
Compare
|
@blueorangutan help |
|
@andrijapanicsb [SL] I understand these words: "help", "hello", "thanks", "package", "test" Blessed contributors for kicking Trillian test jobs: ['rohityadavcloud', 'shwstppr', 'Damans227', 'vishesh92', 'Pearl1594', 'harikrishna-patnala', 'nvazquez', 'DaanHoogland', 'weizhouapache', 'borisstoyanov', 'vladimirpetrov', 'kiranchavala', 'andrijapanicsb', 'NuxRo', 'rajujith', 'alexandremattioli', 'sureshanaparti', 'abh1sar', 'sudo87', 'RosiKyu'] |
8f46ffb to
b53c760
Compare
|
Packaging result [SF]: ✖️ el8 ✖️ el9 ✖️ debian ✖️ suse15. SL-JID 17767 |
|
@blueorangutan package kvm |
|
@andrijapanicsb a [SL] Jenkins job has been kicked to build packages. It will be bundled withkvm SystemVM template(s). I'll keep you posted as I make progress. |
|
@andrijapanicsb a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests |
|
@blueorangutan package kvm |
|
@andrijapanicsb a [SL] Jenkins job has been kicked to build packages. It will be bundled with kvm SystemVM template(s). I'll keep you posted as I make progress. |
|
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 17850 |
|
@blueorangutan package kvm,vmware |
|
@andrijapanicsb a [SL] Jenkins job has been kicked to build packages. It will be bundled with kvm,vmware SystemVM template(s). I'll keep you posted as I make progress. |
|
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✖️ debian ✔️ suse15. SL-JID 17876 |
|
@blueorangutan test |
|
@andrijapanicsb a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests |
|
[SF] Trillian test result (tid-16172)
|
|
This pull request has merge conflicts. Dear author, please fix the conflicts and sync your branch with the base branch. |
|
@andrijapanicsb @prashanthr2 |
|
moving to 4.24.0 milestone |
Remote KVM imports always generated a replacement MAC on conflict because the import path hardcoded forced=true and duplicate preservation=false. Preserve the historical replacement default when forced is omitted, while honoring explicit forced=false and allowduplicatemacaddresses=true. Reject incompatible options before import side effects and forward the resolved policy to NIC allocation. Update the UI to show the remote KVM default, preserve mutual exclusion, and submit forced=false explicitly. Add backend, allocator, and UI coverage for the supported conflict policies.
b53c760 to
0b7aa78
Compare
Declare the checked exceptions raised by importNic Mockito verifications and cover remote KVM duplicate-MAC forwarding when forced is omitted.
Description
This change adds an explicit import option to preserve duplicate NIC MAC addresses during VM import workflows.
The existing
forcedoption continues to mean: if the imported VM has a NIC MAC address that already exists on the selected CloudStack network, continue the import by generating a new MAC address.A new
allowduplicatemacaddressesAPI parameter allows the opposite behavior: preserve the imported VM's MAC address even if that same MAC is already present on the selected network. The two options are mutually exclusive.This is useful for migration cutover workflows where a VMware-sourced VM is imported to KVM while the original VM still exists in CloudStack, but the operator wants the imported instance to keep the same MAC address for guest/network continuity.
The UI import form now labels
forcedas "Generate new MAC if required" and exposes a separate "Allow duplicate MAC addresses" switch.These MAC conflicting) options are shown for VM migration/import flows where an existing source VM has NICs to preserve.
They are hidden when creating a brand-new VM from existing QCOW2 files on local/shared storage, because that path creates a new CloudStack NIC instead of importing a source NIC from another VM.
In other words, the MAC options are available when CloudStack has to decide what to do with a MAC address from a source VM: either keep it, generate a replacement, or fail on conflict. They are not shown for QCOW2 disk import, where there is no source VM NIC to preserve.
Types of changes
Testing
mvn -pl api -am -DskipTests installmvn -pl server -am -DskipTests compilenpm run lint -- --no-fix src/views/tools/ImportUnmanagedInstance.vueui/public/locales/en.jsongit diff --checkAllow-dupicate-MAC-due-Import-compressed-under-100MB.mp4