Skip to content

Routed: get vm network statistics on Routed network - #13105

Merged
harikrishna-patnala merged 4 commits into
apache:4.22from
weizhouapache:4.22-routed-network-statictics
Sep 10, 2026
Merged

Routed: get vm network statistics on Routed network#13105
harikrishna-patnala merged 4 commits into
apache: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

codecov Bot commented May 5, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 84.61538% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 17.83%. Comparing base (2b3cca6) to head (bb9269d).

Files with missing lines Patch % Lines
...src/main/java/com/cloud/server/StatsCollector.java 84.61% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff            @@
##               4.22   #13105   +/-   ##
=========================================
  Coverage     17.83%   17.83%           
- Complexity    16023    16029    +6     
=========================================
  Files          5928     5928           
  Lines        534404   534414   +10     
  Branches      65399    65403    +4     
=========================================
+ Hits          95290    95295    +5     
- Misses       428296   428301    +5     
  Partials      10818    10818           
Flag Coverage Δ
uitests 3.82% <ø> (ø)
unittests 18.90% <84.61%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 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.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 thread server/src/main/java/com/cloud/server/StatsCollector.java Outdated
Comment thread server/src/main/java/com/cloud/server/StatsCollector.java Outdated

@sureshanaparti sureshanaparti left a comment

Copy link
Copy Markdown
Contributor

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

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 2 comments.

Comment thread server/src/main/java/com/cloud/server/StatsCollector.java Outdated
Comment thread server/src/main/java/com/cloud/server/StatsCollector.java Outdated
@sureshanaparti

Copy link
Copy Markdown
Contributor

@blueorangutan test

@sureshanaparti sureshanaparti modified the milestones: 4.22.1, 4.22.2 May 7, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

Comment thread server/src/main/java/com/cloud/server/StatsCollector.java
@weizhouapache
weizhouapache marked this pull request as ready for review May 7, 2026 10:45
@DaanHoogland DaanHoogland moved this from Backlog to Ready in CloudStack Testing Aug 31, 2026
@github-actions

github-actions Bot commented Sep 6, 2026

Copy link
Copy Markdown

This PR is stale because it has been open for 120 days with no activity. It may be removed by administrators of this project at any time. Remove the stale label or comment to request for removal of it to prevent this.

@apache apache deleted a comment from blueorangutan Sep 7, 2026
@apache apache deleted a comment from blueorangutan Sep 7, 2026
@apache apache deleted a comment from blueorangutan Sep 7, 2026
@apache apache deleted a comment from blueorangutan Sep 7, 2026
@DaanHoogland

Copy link
Copy Markdown
Contributor

@blueorangutan package

@blueorangutan

Copy link
Copy Markdown

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

@blueorangutan

Copy link
Copy Markdown

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

@DaanHoogland

Copy link
Copy Markdown
Contributor

@blueorangutan test keepEnv

@blueorangutan

Copy link
Copy Markdown

@DaanHoogland a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests

@blueorangutan

blueorangutan commented Sep 8, 2026

Copy link
Copy Markdown

[SF] Trillian test result (tid-16919)
Environment: kvm-ol8 (x2), zone: Advanced Networking with Mgmt server ol8
Total time taken: 55973 seconds
Marvin logs: [archive removed]
Smoke tests completed. 147 look OK, 2 have errors, 0 did not run
Only failed and skipped tests results shown below:

Test Result Time (s) Test File
test_02_enableHumanReadableLogs Error 0.30 test_human_readable_logs.py
test_01_browser_migrate_template Error 66.03 test_image_store_object_migration.py

@harikrishna-patnala harikrishna-patnala self-assigned this Sep 9, 2026

@harikrishna-patnala harikrishna-patnala left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM. Tested on Routed, isolated and shared networks.

@harikrishna-patnala
harikrishna-patnala merged commit 434df40 into apache:4.22 Sep 10, 2026
26 checks passed
@github-project-automation github-project-automation Bot moved this from Ready to Done in CloudStack Testing Sep 10, 2026
@weizhouapache
weizhouapache deleted the 4.22-routed-network-statictics branch September 10, 2026 09:16
weizhouapache added a commit that referenced this pull request Sep 10, 2026
* Routed: get vm network statistics on Routed network

* Potential fix for pull request finding

* Create method isNetworkEligibleForNetworkStats and add unit tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Development

Successfully merging this pull request may close these issues.

7 participants