Skip to content

Routed: get vm network statistics on Routed network#13105

Draft
weizhouapache wants to merge 1 commit intoapache:4.22from
weizhouapache:4.22-routed-network-statictics
Draft

Routed: get vm network statistics on Routed network#13105
weizhouapache wants to merge 1 commit intoapache:4.22from
weizhouapache:4.22-routed-network-statictics

Conversation

@weizhouapache
Copy link
Copy Markdown
Member

Description

This PR fixes #11299

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):

How Has This Been Tested?

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

@codecov
Copy link
Copy Markdown

codecov Bot commented May 5, 2026

Codecov Report

❌ Patch coverage is 0% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 17.68%. Comparing base (5b9a3d7) to head (6501879).

Files with missing lines Patch % Lines
...src/main/java/com/cloud/server/StatsCollector.java 0.00% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff            @@
##               4.22   #13105   +/-   ##
=========================================
  Coverage     17.67%   17.68%           
- Complexity    15791    15794    +3     
=========================================
  Files          5922     5922           
  Lines        533085   533087    +2     
  Branches      65205    65206    +1     
=========================================
+ Hits          94243    94275   +32     
+ Misses       428204   428172   -32     
- Partials      10638    10640    +2     
Flag Coverage Δ
uitests 3.69% <ø> (ø)
unittests 18.76% <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.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 NetworkDao and RoutedIpv4Manager into StatsCollector to support routed-network detection during stats collection.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +1594 to +1595
if (CollectionUtils.isEmpty(vlan) || (vlan.get(0).getVlanType() != VlanType.DirectAttached
&& (networkVO == null || !routedIpv4Manager.isRoutedNetwork(networkVO)))) {
Comment on lines +1594 to +1595
if (CollectionUtils.isEmpty(vlan) || (vlan.get(0).getVlanType() != VlanType.DirectAttached
&& (networkVO == null || !routedIpv4Manager.isRoutedNetwork(networkVO)))) {
Copy link
Copy Markdown
Contributor

@sureshanaparti sureshanaparti left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clgtm

@sureshanaparti
Copy link
Copy Markdown
Contributor

@blueorangutan package

@blueorangutan
Copy link
Copy Markdown

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

@blueorangutan
Copy link
Copy Markdown

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

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