Skip to content

Conversation

@abh1sar
Copy link
Collaborator

@abh1sar abh1sar commented Aug 25, 2025

Description

This PR fixes #11183

  • Vlan id is shown correctly in the Import VM Form instead of -1.
  • The default network selected in the form is retrieved using the vlan id.

Types of changes

  • Breaking change (fix or feature that would cause existing functionality to change)
  • New feature (non-breaking change which adds functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • Enhancement (improves an existing feature and functionality)
  • Cleanup (Code refactoring and cleanup, that may add test cases)
  • build/CI
  • test (unit or integration test code)

Feature/Enhancement Scale or Bug Severity

Feature/Enhancement Scale

  • Major
  • Minor

Bug Severity

  • BLOCKER
  • Critical
  • Major
  • Minor
  • Trivial

Screenshots (if appropriate):

Before fix:
vlan1

After fix:
vlan2

Before match default network with vlan in UI change:
vlan3

After:
vlan4

How Has This Been Tested?

How did you try to break this feature and the system with this change?

@codecov
Copy link

codecov bot commented Aug 25, 2025

Codecov Report

❌ Patch coverage is 0% with 17 lines in your changes missing coverage. Please review.
✅ Project coverage is 16.17%. Comparing base (adec5f4) to head (ea5e1c0).
⚠️ Report is 16 commits behind head on 4.20.

Files with missing lines Patch % Lines
...ervisor/kvm/resource/LibvirtComputingResource.java 0.00% 11 Missing ⚠️
...er/LibvirtGetUnmanagedInstancesCommandWrapper.java 0.00% 6 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##               4.20   #11507    +/-   ##
==========================================
  Coverage     16.17%   16.17%            
- Complexity    13290    13295     +5     
==========================================
  Files          5656     5656            
  Lines        498020   498121   +101     
  Branches      60405    60431    +26     
==========================================
+ Hits          80545    80569    +24     
- Misses       408513   408584    +71     
- Partials       8962     8968     +6     
Flag Coverage Δ
uitests 4.00% <ø> (-0.01%) ⬇️
unittests 17.02% <0.00%> (+<0.01%) ⬆️

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.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@abh1sar abh1sar marked this pull request as draft August 27, 2025 07:22
@weizhouapache weizhouapache linked an issue Aug 29, 2025 that may be closed by this pull request
@abh1sar abh1sar marked this pull request as ready for review August 29, 2025 09:45
@abh1sar abh1sar requested a review from weizhouapache August 29, 2025 09:46
@abh1sar
Copy link
Collaborator Author

abh1sar commented Aug 29, 2025

@blueorangutan package

@blueorangutan
Copy link

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

Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 14767

@weizhouapache
Copy link
Member

@blueorangutan package

@blueorangutan
Copy link

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

Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 14832

@weizhouapache
Copy link
Member

@blueorangutan package

@blueorangutan
Copy link

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

Packaging result [SF]: ✖️ el8 ✖️ el9 ✔️ debian ✖️ suse15. SL-JID 14854

@weizhouapache
Copy link
Member

@blueorangutan test ubuntu24 kvm-ubuntu24

@blueorangutan
Copy link

@weizhouapache a [SL] Trillian-Jenkins test job (ubuntu24 mgmt + kvm-ubuntu24) has been kicked to run smoke tests

@blueorangutan
Copy link

[SF] Trillian Build Failed (tid-14215)

@weizhouapache
Copy link
Member

@blueorangutan package

@blueorangutan
Copy link

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

Packaging result [SF]: ✖️ el8 ✖️ el9 ✔️ debian ✖️ suse15. SL-JID 14866

@weizhouapache
Copy link
Member

@blueorangutan package

@blueorangutan
Copy link

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

Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 14871

@abh1sar abh1sar marked this pull request as draft September 10, 2025 04:07
@blueorangutan
Copy link

[SF] Trillian test result (tid-14258)
Environment: kvm-ol8 (x2), zone: Advanced Networking with Mgmt server ol8
Total time taken: 54386 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr11507-t14258-kvm-ol8.zip
Smoke tests completed. 141 look OK, 0 have errors, 0 did not run
Only failed and skipped tests results shown below:

Test Result Time (s) Test File

@abh1sar
Copy link
Collaborator Author

abh1sar commented Sep 10, 2025

@blueorangutan package

@blueorangutan
Copy link

@abh1sar 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.

@weizhouapache
Copy link
Member

@blueorangutan ui

@blueorangutan
Copy link

@weizhouapache a Jenkins job has been kicked to build UI QA env. I'll keep you posted as I make progress.

@blueorangutan
Copy link

UI build: ✔️
Live QA URL: https://qa.cloudstack.cloud/simulator/pr/11507 (QA-JID-745)

@blueorangutan
Copy link

Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 14934

@weizhouapache
Copy link
Member

@abh1sar
thanks for the update

is it ready for testing/review ?

@weizhouapache
Copy link
Member

@blueorangutan test

@blueorangutan
Copy link

@weizhouapache a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests

@abh1sar
Copy link
Collaborator Author

abh1sar commented Sep 10, 2025

@abh1sar thanks for the update

is it ready for testing/review ?

@weizhouapache unfortunately, that commit didn't fix the issue. I have added another commit which should fix it.

@abh1sar
Copy link
Collaborator Author

abh1sar commented Sep 10, 2025

@blueorangutan package

@weizhouapache
Copy link
Member

@abh1sar thanks for the update
is it ready for testing/review ?

@weizhouapache unfortunately, that commit didn't fix the issue. I have added another commit which should fix it.

good, thanks @abh1sar

@abh1sar
Copy link
Collaborator Author

abh1sar commented Sep 10, 2025

@blueorangutan package

@blueorangutan
Copy link

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

Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 14941

@abh1sar
Copy link
Collaborator Author

abh1sar commented Sep 10, 2025

@blueorangutan test

@blueorangutan
Copy link

@abh1sar a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests

@abh1sar abh1sar marked this pull request as ready for review September 11, 2025 01:54
@abh1sar
Copy link
Collaborator Author

abh1sar commented Sep 11, 2025

@weizhouapache this is ready for review/testing now.

@weizhouapache
Copy link
Member

looks good

vm is attached to bridge with vlan 2472
image

vm is attached to bridge without virtual nic with vlanid
image

vm is not attached to bridge
image

@weizhouapache
Copy link
Member

weizhouapache commented Sep 11, 2025

We had some issues with the testing environments.
Merging on approvals and manual test results. Will keep eye on smoke tests of the health check PR

@weizhouapache weizhouapache merged commit e64e94a into apache:4.20 Sep 11, 2025
23 of 26 checks passed
@blueorangutan
Copy link

[SF] Trillian test result (tid-14282)
Environment: kvm-ol8 (x2), zone: Advanced Networking with Mgmt server ol8
Total time taken: 64276 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr11507-t14282-kvm-ol8.zip
Smoke tests completed. 137 look OK, 4 have errors, 0 did not run
Only failed and skipped tests results shown below:

Test Result Time (s) Test File
ContextSuite context=TestSetSourceNatIp>:setup Error 0.00 test_set_sourcenat.py
ContextSuite context=TestSharedFSLifecycle>:setup Error 0.00 test_sharedfs_lifecycle.py
ContextSuite context=TestSnapshotRootDisk>:setup Error 0.00 test_snapshots.py
ContextSuite context=TestSnapshotStandaloneBackup>:setup Error 0.00 test_snapshots.py
test_12_list_user_webhook_deliveries Failure 11.37 test_webhook_lifecycle.py

@DaanHoogland DaanHoogland deleted the vlanid-import-kvm branch September 15, 2025 07:15
dhslove pushed a commit to ablecloud-team/ablestack-cloud that referenced this pull request Sep 15, 2025
* Get vlan from bridge name while importing kvm instances

* Fix LibvirtReplugNicCommandWrapperTest

* Cleanup MultiNetworkSelection.vue

* getting the vlanid from the /proc/net/vlan/<pif> file instead of the bridge name

* Update plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/resource/wrapper/LibvirtGetUnmanagedInstancesCommandWrapper.java

Co-authored-by: dahn <[email protected]>

* Don't call sendValuesTimed from getDefaultNetwork as it's causing an infinte loop

* set default network values in setDefaultValues instead of getDefaultNetwork

---------

Co-authored-by: Wei Zhou <[email protected]>
Co-authored-by: dahn <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improve VLAN detection for importing KVM instances

4 participants