Skip to content

NetworkGarbageCollector can tear down a network with a live Running VR - #14281

Draft
DaanHoogland wants to merge 1 commit into
apache:4.22from
shapeblue:ghi14177-vrRunningNicCountGc
Draft

DaanHoogland wants to merge 1 commit into
apache:4.22from
shapeblue:ghi14177-vrRunningNicCountGc

Conversation

@DaanHoogland

Copy link
Copy Markdown
Contributor

countNicsForNonStoppedRunningVrs() in NicDaoImpl checked VR state Starting/Stopping/Migrating but omitted Running, so a router that resynced back to Running after a spurious PowerReportMissing was never counted, letting isNetworkReadyForGc() approve garbage collection of a network with a live NIC/VR.

Added VirtualMachine.State.Running to the state filter and a test, NicDaoImplTest#testCountNicsForNonStoppedRunningVrsIncludesRunningState, which fails without the fix (asserts the join's state parameters include Running).

Generated-by: Claude Code (claude-sonnet-5)

Description

This PR...

Fixes: #14177

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?

… Running VR

countNicsForNonStoppedRunningVrs() in NicDaoImpl checked VR state
Starting/Stopping/Migrating but omitted Running, so a router that
resynced back to Running after a spurious PowerReportMissing was never
counted, letting isNetworkReadyForGc() approve garbage collection of a
network with a live NIC/VR.

Added VirtualMachine.State.Running to the state filter and a test,
NicDaoImplTest#testCountNicsForNonStoppedRunningVrsIncludesRunningState,
which fails without the fix (asserts the join's state parameters
include Running).

Generated-by: Claude Code (claude-sonnet-5)
@DaanHoogland DaanHoogland added this to the 4.22.2 milestone Oct 1, 2026
@codecov

codecov Bot commented Oct 1, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 18.00%. Comparing base (250695e) to head (0f2d389).
⚠️ Report is 3 commits behind head on 4.22.

Additional details and impacted files
@@            Coverage Diff            @@
##               4.22   #14281   +/-   ##
=========================================
  Coverage     18.00%   18.00%           
+ Complexity    16220    16219    -1     
=========================================
  Files          5936     5936           
  Lines        535716   535716           
  Branches      65596    65596           
=========================================
+ Hits          96457    96462    +5     
+ Misses       428269   428264    -5     
  Partials      10990    10990           
Flag Coverage Δ
uitests 4.02% <ø> (ø)
unittests 19.08% <100.00%> (+<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.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant