Clear System VM IP from NICs for PublicNetworkGuru#11992
Conversation
Codecov Report❌ Patch coverage is
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
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
@Pearl1594 I see the benefit of keeping the public IPs, from users' perspective. |
...hestration/src/main/java/org/apache/cloudstack/engine/orchestration/NetworkOrchestrator.java
Outdated
Show resolved
Hide resolved
|
@blueorangutan package |
|
@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. |
|
|
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 15657 |
|
@blueorangutan test keepEnv |
|
@DaanHoogland a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests |
|
[SF] Trillian test result (tid-14778)
|
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. |
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 ? |
shwstppr
left a comment
There was a problem hiding this comment.
sysvm-clearpublicip.mp4
LGTM. Tried recereating system VMs multiple times and IPs for nics with PublicNetworkGuru were cleared while I didn't see public IPs change for new system VMs.
mysql> SELECT * FROM nics WHERE instance_id IN (3,4) AND reserver_name='PublicNetworkGuru'\G
*************************** 1. row ***************************
id: 7
uuid: a0f0cc87-bfc0-4d3b-b0ef-849692905fa5
instance_id: 3
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: 2026-01-30 06:06:49
removed: 2026-01-30 06:08:08
ip6_gateway: NULL
ip6_cidr: NULL
secondary_ip: 0
display_nic: 1
mtu: NULL
*************************** 2. row ***************************
id: 10
uuid: 23804b39-ef02-485e-9792-5a068deb8017
instance_id: 4
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: ConsoleProxy
created: 2026-01-30 06:06:49
removed: 2026-01-30 06:08:08
ip6_gateway: NULL
ip6_cidr: NULL
secondary_ip: 0
display_nic: 1
mtu: NULL
2 rows in set (0.00 sec)
|
@weizhouapache can you please check? |
@shwstppr
for testing, we may disable the zone, then destroy a systemvm, assign the public Ip to network, enable the zone, etc |
kiranchavala
left a comment
There was a problem hiding this comment.
LGTM
Tested manually
mysql> SELECT * FROM nics WHERE instance_id IN (1,2) AND reserver_name='PublicNetworkGuru'\G
*************************** 1. row ***************************
id: 1
uuid: b5d76a34-63c3-413d-8417-56b92335ed3d
instance_id: 1
mac_address: 1e:00:6d:00:00:01
ip4_address: 10.0.57.201
netmask: 255.255.240.0
gateway: 10.0.48.1
ip_type: Ip4
broadcast_uri: vlan://51
network_id: 200
mode: Static
state: Reserved
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: ConsoleProxy
created: 2026-03-10 11:10:58
removed: NULL
ip6_gateway: NULL
ip6_cidr: NULL
secondary_ip: 0
display_nic: 1
mtu: NULL
*************************** 2. row ***************************
id: 4
uuid: dfbbc168-bab9-43e1-8e75-e8e812c26601
instance_id: 2
mac_address: 1e:00:ad:00:00:02
ip4_address: 10.0.57.202
netmask: 255.255.240.0
gateway: 10.0.48.1
ip_type: Ip4
broadcast_uri: vlan://51
network_id: 200
mode: Static
state: Reserved
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: 2026-03-10 11:10:58
removed: NULL
ip6_gateway: NULL
ip6_cidr: NULL
secondary_ip: 0
display_nic: 1
mtu: NULL
2 rows in set (0.00 sec)
After destroying
mysql> SELECT * FROM nics WHERE instance_id IN (1,2) AND reserver_name='PublicNetworkGuru'\G
*************************** 1. row ***************************
id: 1
uuid: b5d76a34-63c3-413d-8417-56b92335ed3d
instance_id: 1
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: ConsoleProxy
created: 2026-03-10 11:10:58
removed: 2026-03-11 07:44:49
ip6_gateway: NULL
ip6_cidr: NULL
secondary_ip: 0
display_nic: 1
mtu: NULL
*************************** 2. row ***************************
id: 4
uuid: dfbbc168-bab9-43e1-8e75-e8e812c26601
instance_id: 2
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: 2026-03-10 11:10:58
removed: 2026-03-11 07:44:49
ip6_gateway: NULL
ip6_cidr: NULL
secondary_ip: 0
display_nic: 1
mtu: NULL
2 rows in set (0.00 sec)
Also tested by disable the zone, then destroy a systemvm, assign the public Ip to network, enable the zone,
The new systemvm got a new public ip assigned
|
I will test too please wait before merging |
|
cc @DaanHoogland @kiranchavala @shwstppr My testing results
|
|
my summary:
cc @DaanHoogland @Pearl1594 |
|
Thanks @weizhouapache DO you suggest that we not go ahead with this and let the current behaviour be? |
@Pearl1594 |
|
I had a testing without this PR, and got the same result
my opinion is
|





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
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
Bug Severity
Screenshots (if appropriate):
Before Fix:
On deleting SSVM id 3: (both public & control nic)
How Has This Been Tested?
After fix:
On deleting SSVM id 3: (both public & control nic)
How did you try to break this feature and the system with this change?