Routed: get vm network statistics on Routed network#13105
Routed: get vm network statistics on Routed network#13105weizhouapache wants to merge 2 commits intoapache:4.22from
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## 4.22 #13105 +/- ##
=========================================
Coverage 17.67% 17.68%
- Complexity 15791 15793 +2
=========================================
Files 5922 5922
Lines 533085 533091 +6
Branches 65205 65209 +4
=========================================
+ Hits 94243 94269 +26
+ Misses 428204 428180 -24
- Partials 10638 10642 +4
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:
|
There was a problem hiding this comment.
Pull request overview
This PR updates the management server’s periodic VM network statistics collection logic (StatsCollector) to include routed guest networks (in addition to shared/direct-attached networks), addressing issue #11299.
Changes:
- Extend VM network stats interval config descriptions to mention both Shared and Routed networks.
- Update the VM network stats collection filter to accept routed networks (via
RoutedIpv4Manager.isRoutedNetwork(...)) in addition to direct-attached VLAN networks. - Inject
NetworkDaoandRoutedIpv4ManagerintoStatsCollectorto support routed-network detection during stats collection.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
@blueorangutan package |
|
@sureshanaparti 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 17717 |
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
| NicVO nic = _nicDao.search(sc_nic, null).get(0); | ||
| List<VlanVO> vlan = _vlanDao.listVlansByNetworkId(nic.getNetworkId()); | ||
| if (vlan == null || vlan.size() == 0 || vlan.get(0).getVlanType() != VlanType.DirectAttached) | ||
| continue; // only get network statistics for DirectAttached network (shared networks in Basic zone and Advanced zone with/without SG) | ||
| NetworkVO networkVO = networkDao.findById(nic.getNetworkId()); | ||
| boolean isRoutedNetwork = networkVO != null && routedIpv4Manager.isRoutedNetwork(networkVO); | ||
| boolean isDirectAttachedNetwork = CollectionUtils.isNotEmpty(vlan) | ||
| && vlan.get(0).getVlanType() == VlanType.DirectAttached; |
| NetworkVO networkVO = networkDao.findById(nic.getNetworkId()); | ||
| boolean isRoutedNetwork = networkVO != null && routedIpv4Manager.isRoutedNetwork(networkVO); | ||
| boolean isDirectAttachedNetwork = CollectionUtils.isNotEmpty(vlan) | ||
| && vlan.get(0).getVlanType() == VlanType.DirectAttached; | ||
| if (!isRoutedNetwork && !isDirectAttachedNetwork) { | ||
| continue; // only get network statistics for Shared or Routed network | ||
| } |
Description
This PR fixes #11299
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?