Repository navigation
Conversation
|
@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. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## 4.22 #14333 +/- ##
============================================
- Coverage 18.02% 18.02% -0.01%
- Complexity 16250 16262 +12
============================================
Files 5936 5936
Lines 535823 535847 +24
Branches 65612 65617 +5
============================================
+ Hits 96582 96586 +4
- Misses 428242 428263 +21
+ Partials 10999 10998 -1
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:
|
|
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 19442 |
|
@blueorangutan test |
|
@nvazquez a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests |
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Legacy APIPA values can remain exposed, and malformed IPv6 zone input can throw unexpectedly.
Review effort: Balanced
Findings: 2
Open (2)
What changed in this PR
Fixes stale APIPA/link-local addresses reported for externally DHCP-managed L2 VM NICs.
Changes:
- Adds IPv4/IPv6 link-local detection utilities.
- Filters link-local addresses from KVM guest-agent results.
- Retries NICs containing previously recorded APIPA addresses.
| File | Description |
|---|---|
NetUtils.java |
Adds link-local address helpers. |
NetUtilsTest.java |
Tests link-local detection. |
UserVmManagerImpl.java |
Handles and retries APIPA NIC addresses. |
LibvirtGetVmIpAddressCommandWrapper.java |
Ignores link-local guest addresses. |
LibvirtGetVmIpAddressCommandWrapperTest.java |
Tests APIPA and DHCP parsing. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| for (NicVO nic : nics) { | ||
| if (nic.getIPv4Address() == null) { | ||
| // also retry NICs holding a link-local (APIPA) address recorded before the guest obtained its DHCP lease | ||
| if (nic.getIPv4Address() == null || NetUtils.isLinkLocalIp4(nic.getIPv4Address())) { |
| if (ip == null) { | ||
| return false; | ||
| } | ||
| final String address = ip.split("%")[0]; |
|
[SF] Trillian test result (tid-17089)
|

Description
This PR an issue observed on L2 Networks with external DHCP server:
On an L2 guest network with an external DHCP server, CloudStack learns a Windows VM's IP address as the self-assigned (APIPA / link-local) address
169.254.149.120. It recorded that as the NIC's IP and never refreshed it. More than 30 minutes later,listVirtualMachinesstill reports169.254.149.120, while the guest really has172.25.16.236(DHCP). The QEMU guest agent reports172.25.16.236, and SSH on172.25.16.236:22is reachable.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?