Skip to content

kvm: do not delete system bridges and VLAN interfaces - #14324

Open
winterhazel wants to merge 3 commits into
apache:4.22from
winterhazel:do-not-remove-system-bridges
Open

winterhazel wants to merge 3 commits into
apache:4.22from
winterhazel:do-not-remove-system-bridges

Conversation

@winterhazel

Copy link
Copy Markdown
Member

Description

There are cases in which operators may want to manually create a bridge following the same naming convention used by the KVM agent (br<if>-<vid>) and configure it as a zone's traffic label, so that it can be also introduced as a guest network, for instance.

However, when the last vif from this guest network is unplugged, the KVM agent always deletes the bridge and its parent VLAN interface, even when the bridge is still in use outside the platform.

This change propagates the network labels of a zone's physical networks to the KVM agents, and makes them avoid cleaning up these bridges.

Fixes #14228.

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

Bug Severity

  • BLOCKER
  • Critical
  • Major
  • Minor
  • Trivial

Screenshots (if appropriate):

How Has This Been Tested?

Tests are still pending.

@winterhazel winterhazel added this to the 4.22.2 milestone Oct 7, 2026
@winterhazel

Copy link
Copy Markdown
Member Author

@blueorangutan package

@blueorangutan

Copy link
Copy Markdown

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

codecov Bot commented Oct 7, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 35.34483% with 75 lines in your changes missing coverage. Please review.
✅ Project coverage is 18.33%. Comparing base (2974af8) to head (91dc1a7).
⚠️ Report is 39 commits behind head on 4.22.

Files with missing lines Patch % Lines
...ain/java/com/cloud/network/NetworkServiceImpl.java 0.00% 40 Missing ⚠️
...java/com/cloud/agent/manager/AgentManagerImpl.java 0.00% 26 Missing ⚠️
...ervisor/kvm/resource/LibvirtComputingResource.java 55.55% 8 Missing ⚠️
...cloud/hypervisor/kvm/resource/BridgeVifDriver.java 85.71% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               4.22   #14324      +/-   ##
============================================
+ Coverage     18.02%   18.33%   +0.30%     
- Complexity    16250    16665     +415     
============================================
  Files          5936     5939       +3     
  Lines        535823   537887    +2064     
  Branches      65612    65943     +331     
============================================
+ Hits          96582    98607    +2025     
+ Misses       428242   428062     -180     
- Partials      10999    11218     +219     
Flag Coverage Δ
uitests 4.08% <ø> (+0.04%) ⬆️
unittests 19.42% <35.34%> (+0.32%) ⬆️

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.

@blueorangutan

Copy link
Copy Markdown

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

@nvazquez nvazquez modified the milestones: 4.22.2, 4.22.3 Nov 9, 2026
@winterhazel

Copy link
Copy Markdown
Member Author

@blueorangutan package

@blueorangutan

Copy link
Copy Markdown

@winterhazel 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 20100

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

KVM agent deletes externally-managed (netplan/networkd) bridges and VLAN interfaces it did not create

5 participants