You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Support multiple guest physical networks for KVM trunking - #14937
The KVM agent's trunk-nic/VLAN-filtering support treated vlan_filtering (and STP) as a single host-wide property. It didn't support vlan unaware bridges (vlan_filtering off ) with vlan aware guest bridges. All guest bridges needed to have vlan_filtering flipped to true.
With multiple Guest physical networks per host, each with its own bridge, a host can legitimately have vlan_filtering enabled on one bridge and not on another.
With this enhancement, one wouldn't have to put the host into maintenance mode and flip the existing guest bridges vlan_filtering setting, but can add a new guest physical network(bridge) to the zone and make it vlan aware, such that VMs on the old guest physical network continue to use the dedicated per vlan bridge topology and those on the new physical network use the shared bridge topo.
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
Screenshots (if appropriate):
How Has This Been Tested?
This was tested on an 8 host KVM lab spanning 2 guest physical networks(cloudbr1 and cloudbr2), 2 libvirt versions (8.0.0 / 11.10.0), and intentionally mixed per-host vlan_filtering/STP state
Ordinary VLAN nic placement on filtered and unfiltered bridges (both libvirt versions)
Trunk nic placement, filtered bridge (both libvirt versions), including the manual VLAN-membership fallback on libvirt < 11.0.0 (confirmed via bridge vlan show / absence of domain XML)
Live migration: same-libvirt-version and cross-host, including a trunk nic through the manual-membership path on both ends
Trunk-nic association, disassociation, and primary-network change (stop/change/start) - bridge and VLAN membership verified via virsh/bridge vlan show after each
Deploy-time auto-placement avoidance for VLAN-1 nics (planner correctly avoids filtering-enabled hosts with no explicit host specified)
findHostsForMigration suitability matrix for both trunk nics (need filtering-enabled host) and VLAN-1 nics (need legacy host) - exact match to each host's actual bridge state
Live associate/add-nic rejected correctly when the current host's bridge doesn't support the requirement, with the correct physical-network-scoped error message
Cross-physical-network trunk association still rejected (unaffected, pre-existing validation)
STP caution fires only for nics on a bridge with STP on; trunk-XML caution fires only for trunk nics on libvirt < 11.0.0 hosts; neither ever incorrectly overlaps
Host details/API consistency: per-physical-network keys, bridge-name resolution, rollup semantics, verified across multiple hosts with differing state
UI: list hosts now shows the count of bridges per host that have vlan_filtering on ie, X/Y vlan filtering badge seen when the feature is enabled and has vlan filtering on guest phy bridge on the host.
How did you try to break this feature and the system with this change?
❌ Patch coverage is 45.05495% with 100 lines in your changes missing coverage. Please review.
✅ Project coverage is 21.08%. Comparing base (8eaff97) to head (2b8fe81).
@Pearl1594 a [SL] Jenkins job has been kicked to build packages. It will be bundled with no SystemVM templates. I'll keep you posted as I make progress.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
The KVM agent's trunk-nic/VLAN-filtering support treated vlan_filtering (and STP) as a single host-wide property. It didn't support vlan unaware bridges (vlan_filtering off ) with vlan aware guest bridges. All guest bridges needed to have vlan_filtering flipped to true.
With multiple Guest physical networks per host, each with its own bridge, a host can legitimately have vlan_filtering enabled on one bridge and not on another.
With this enhancement, one wouldn't have to put the host into maintenance mode and flip the existing guest bridges vlan_filtering setting, but can add a new guest physical network(bridge) to the zone and make it vlan aware, such that VMs on the old guest physical network continue to use the dedicated per vlan bridge topology and those on the new physical network use the shared bridge topo.
Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
Screenshots (if appropriate):
How Has This Been Tested?
This was tested on an 8 host KVM lab spanning 2 guest physical networks(cloudbr1 and cloudbr2), 2 libvirt versions (8.0.0 / 11.10.0), and intentionally mixed per-host vlan_filtering/STP state
How did you try to break this feature and the system with this change?