Repository navigation
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## 4.22 #14891 +/- ##
============================================
- Coverage 18.34% 18.33% -0.01%
+ Complexity 16668 16666 -2
============================================
Files 5939 5939
Lines 537809 537806 -3
Branches 65938 65937 -1
============================================
- Hits 98637 98610 -27
- Misses 427952 427978 +26
+ Partials 11220 11218 -2
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:
|
|
@blueorangutan package |
|
@nvazquez 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 20213 |
|
@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-17648)
|
There was a problem hiding this comment.
Thanks @Pearl1594 - LGTM:
Manually tested defining 2 ranges for Netris public traffic:
mysql> select v.id,v.vlan_gateway,v.ip4_range,d.name,d.value from vlan v join vlan_details d on (v.id = d.vlan_id) where v.removed is null;
+----+--------------+---------------------------+-----------+-------+
| id | vlan_gateway | ip4_range | name | value |
+----+--------------+---------------------------+-----------+-------+
| 4 | 100.99.65.1 | 100.99.65.10-100.99.65.11 | forNetris | true |
| 5 | 100.99.66.1 | 100.99.66.10-100.99.66.14 | forNetris | true |
+----+--------------+---------------------------+-----------+-------+
2 rows in set (0.00 sec)
Deployed 2 VPCs to exhaust the first range, and then could continue deploying a new VPC which used the second range:
mysql> select id,public_ip_address, allocated, state from user_ip_address where vlan_db_id = 4;
+----+-------------------+---------------------+-----------+
| id | public_ip_address | allocated | state |
+----+-------------------+---------------------+-----------+
| 41 | 100.99.65.10 | 2026-11-27 22:00:56 | Allocated |
| 42 | 100.99.65.11 | 2026-11-27 22:02:05 | Allocated |
+----+-------------------+---------------------+-----------+
2 rows in set (0.00 sec)
mysql> select id,public_ip_address, allocated, state from user_ip_address where vlan_db_id = 5;
+----+-------------------+---------------------+-----------+
| id | public_ip_address | allocated | state |
+----+-------------------+---------------------+-----------+
| 82 | 100.99.66.10 | 2026-11-30 01:48:14 | Allocated |
| 83 | 100.99.66.11 | NULL | Free |
| 84 | 100.99.66.12 | NULL | Free |
| 85 | 100.99.66.13 | NULL | Free |
| 86 | 100.99.66.14 | NULL | Free |
+----+-------------------+---------------------+-----------+
5 rows in set (0.00 sec)
There was a problem hiding this comment.
🟡 Changes recommended
A remaining active nit requests a regression test covering later provider-tagged ranges when the first tagged range has no free IPs, leaving the fix insufficiently protected against regression.
1 open issue
What changed in this PR
This bug fix enables provider-specific public IP allocation to use a later tagged VLAN range when an earlier matching range is exhausted.
Changes:
- Searches matching provider-tagged VLAN ranges until one with free IP addresses is found.
- Updates logging and allocation failure messages to reflect multiple matching ranges.
- Preserves random IP selection within the first available range.
| File | Description |
|---|---|
| server/src/main/java/com/cloud/network/NetworkServiceImpl.java | Selects free public IPs from the first non-exhausted VLAN range matching the provider detail key and updates related logging and error messages. |
Review effort: Lite
| List<IPAddressVO> freeIps = _ipAddressDao.listByVlanIdAndState(zoneVlan.getId(), State.Free); | ||
| if (CollectionUtils.isNotEmpty(freeIps)) { | ||
| logger.debug("Using VLAN range {} tagged {} on zone {}", zoneVlan.getIpRange(), vlanDetailKey, zone.getName()); | ||
| return freeIps; |

Description
This PR fixes: #14890
Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
Bug Severity
Screenshots (if appropriate):
How Has This Been Tested?
How did you try to break this feature and the system with this change?