Skip to content

Conversation

@Pearl1594
Copy link
Contributor

Description

Fixes: #10872
This PR cleanup the IP details for the public NIC associated to the systemVM to follow consistency with how control & management NICs are cleaned up

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:

On deleting SSVM id 3: (both public & control nic)

*************************** 1. row ***************************
            id: 7
          uuid: 77430159-8fd2-41c3-adbc-b999ed9d4ed5
   instance_id: 3
   mac_address: 1e:00:48:00:00:02
   ip4_address: 10.0.52.82
       netmask: 255.255.240.0
       gateway: 10.0.48.1
       ip_type: Ip4
 broadcast_uri: vlan://51
    network_id: 200
          mode: Static
         state: Deallocating
      strategy: Create
 reserver_name: PublicNetworkGuru
reservation_id: NULL
     device_id: 2
   update_time: NULL
 isolation_uri: vlan://51
   ip6_address: NULL
   default_nic: 1
       vm_type: SecondaryStorageVm
       created: 2025-11-05 11:40:27
       removed: 2025-11-05 12:27:51
   ip6_gateway: NULL
      ip6_cidr: NULL
  secondary_ip: 0
   display_nic: 1
           mtu: NULL
*************************** 2. row ***************************
            id: 8
          uuid: 476f87b8-c5fb-4f00-a9db-e6fc237f8450
   instance_id: 3
   mac_address: NULL
   ip4_address: NULL
       netmask: NULL
       gateway: NULL
       ip_type: NULL
 broadcast_uri: NULL
    network_id: 202
          mode: Static
         state: Deallocating
      strategy: Start
 reserver_name: ControlNetworkGuru
reservation_id: 8d17740d-353e-419f-941c-3cd4d818e49d
     device_id: 0
   update_time: NULL
 isolation_uri: NULL
   ip6_address: NULL
   default_nic: 0
       vm_type: SecondaryStorageVm
       created: 2025-11-05 11:40:27
       removed: 2025-11-05 12:27:51
   ip6_gateway: NULL
      ip6_cidr: NULL
  secondary_ip: 0
   display_nic: 1
           mtu: NULL

How Has This Been Tested?

After fix:

On deleting SSVM id 3: (both public & control nic)

mysql> select * from  nics where instance_id = 10\G
*************************** 1. row ***************************
            id: 26
          uuid: f51c03aa-09c4-46e2-8d93-9fe5c413c3a0
   instance_id: 10
   mac_address: NULL
   ip4_address: NULL
       netmask: NULL
       gateway: NULL
       ip_type: NULL
 broadcast_uri: NULL
    network_id: 200
          mode: Static
         state: Deallocating
      strategy: Create
 reserver_name: PublicNetworkGuru
reservation_id: NULL
     device_id: 2
   update_time: NULL
 isolation_uri: NULL
   ip6_address: NULL
   default_nic: 1
       vm_type: SecondaryStorageVm
       created: 2025-11-05 16:31:22
       removed: 2025-11-05 17:18:25
   ip6_gateway: NULL
      ip6_cidr: NULL
  secondary_ip: 0
   display_nic: 1
           mtu: NULL
*************************** 2. row ***************************
            id: 27
          uuid: 93eb165c-a055-4eca-9c6c-185b3f6ab341
   instance_id: 10
   mac_address: NULL
   ip4_address: NULL
       netmask: NULL
       gateway: NULL
       ip_type: NULL
 broadcast_uri: NULL
    network_id: 202
          mode: Static
         state: Deallocating
      strategy: Start
 reserver_name: ControlNetworkGuru
reservation_id: 9156f5bb-2c3f-410a-8b1d-6c6059ca4ac0
     device_id: 0
   update_time: NULL
 isolation_uri: NULL
   ip6_address: NULL
   default_nic: 0
       vm_type: SecondaryStorageVm
       created: 2025-11-05 16:31:22
       removed: 2025-11-05 17:18:25
   ip6_gateway: NULL
      ip6_cidr: NULL
  secondary_ip: 0
   display_nic: 1
           mtu: NULL

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

@codecov
Copy link

codecov bot commented Nov 5, 2025

Codecov Report

❌ Patch coverage is 0% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 17.56%. Comparing base (d160731) to head (17ba242).
⚠️ Report is 4 commits behind head on 4.22.

Files with missing lines Patch % Lines
...tack/engine/orchestration/NetworkOrchestrator.java 0.00% 4 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               4.22   #11992      +/-   ##
============================================
- Coverage     17.56%   17.56%   -0.01%     
+ Complexity    15545    15543       -2     
============================================
  Files          5909     5909              
  Lines        529056   529620     +564     
  Branches      64617    64920     +303     
============================================
+ Hits          92947    93009      +62     
- Misses       425654   426156     +502     
  Partials      10455    10455              
Flag Coverage Δ
uitests 3.53% <ø> (-0.06%) ⬇️
unittests 18.63% <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.

@weizhouapache
Copy link
Member

@Pearl1594
When system vms are destroyed, will the new system vms always be allocated with the old public IP ?

I see the benefit of keeping the public IPs, from users' perspective.

@DaanHoogland
Copy link
Contributor

@blueorangutan package

@blueorangutan
Copy link

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

@sonarqubecloud
Copy link

sonarqubecloud bot commented Nov 6, 2025

@blueorangutan
Copy link

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

@DaanHoogland
Copy link
Contributor

@blueorangutan test keepEnv

@blueorangutan
Copy link

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

@blueorangutan
Copy link

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

Test Result Time (s) Test File

@DaanHoogland
Copy link
Contributor

@Pearl1594 When system vms are destroyed, will the new system vms always be allocated with the old public IP ?

I see the benefit of keeping the public IPs, from users' perspective.

when a new nic/ssvm is created this is a leakages as the old one does not get released. Do you have an alternative to releasing it this way @weizhouapache ?

tested and works as expected.

@weizhouapache
Copy link
Member

when a new nic/ssvm is created this is a leakages as the old one does not get released. Do you have an alternative to releasing it this way @weizhouapache ?

I do not know if the ip needs to be released, probably reserve the IP as what ACS does on public IP of VR ?

is the public IP of the system VM (CPVM,SSVM) changed in your testing ?
If so, it might cause issues for users who use a reverse proxy in front of CloudStack.

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.

4 participants