Feature: KVM: port isolation for guest VLANs on linux bridge (PVLAN-like isolation without OVS)
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 5/5
- 预计耗时
- 一周以上
- 新手友好度
- 35/100
- Issue 类型
- 功能
- 描述清晰度
- 基本清楚
- 活跃度
- 活跃
- 技术栈
- java, linux
调研方向
Start by tracing InterfaceDef and the domain XML parser, then inspect BridgeVifDriver and the agent configuration that controls KVM networking. The issue describes the desired behavior and limitations, but leaves open whether isolation should be configured per host or through the network’s PVLAN setting. Done means user VM NICs on configured tagged VLANs are isolated, system VM NICs remain non-isolated, and the agent handles unsupported libvirt versions.
由索引模型根据 Issue 内容生成。
描述
The required feature described as a wish
As having KVM hosts with linux bridge, I would like VMs on selected shared guest VLANs to be unable to reach each other, while still reaching the gateway and the virtual router.
Use case: advanced zone without security groups, plus a shared subnet where tenants must not talk to each other. PVLAN is the natural fit, but on KVM it is only implemented for OVS (the #13521 might be related).
On linux bridge there is no supported way to get this.
Today we work around it with a groovy agent hook that adds <port isolated='yes'/> to the NIC.
But that proven to be unreliable:
- the hook only runs on VM start, so NIC hot-plug, replug and live NIC updates might
produce non-isolated ports; - a failing hook is skipped and the VM starts without isolation;
- the hook also isolates the virtual router's NIC.
Proposal
Use the kernel's bridge port isolation, which libvirt exposes as
<port isolated='yes'/>:
InterfaceDefcan emit the element, and the domain XML parser reads it back,
so NIC definitions rebuilt from a running domain keep it.- A new agent property,
network.bridge.port.isolation.vlans, lists the guest
VLANs to isolate. An entry is a VLAN ID, orlabel:vlanto match only the
physical network with that KVM traffic label, e.g.cloudbr1:100,200. BridgeVifDriverplugs user VM guest NICs on those VLANs as isolated ports.
System VM NICs stay non-isolated.- The agent refuses to start if the property is set and libvirt is too old.
Isolation between hosts still relies on the uplink switch (e.g. PVLAN there).
Limitations / open questions
- Configuration is per host, not per network. Would maintainers prefer this to
be driven by the network's existing PVLAN setting instead? Part 1 above is
needed either way. - Only isolated/promiscuous semantics; community PVLANs cannot be expressed.
- Tagged VLAN guest networks only (no untagged, no VXLAN).
I have a working patch proposal (AI generated -- https://github.com/durdin85/cloudstack/tree/kvm-bridge-port-isolation ) and can open a PR if needed, but it would be good to have some human control over this.
Thank you.
- 主要语言
- Java
- 星标
- 3.1k
- 派生
- 1.4k
- 平均合并
- 7 天 4 小时
- 30 天内合并 PR
- 13
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
apache/cloudstack 的其他 Issue
-
bug
难度 2/5 1-3 小时 新手友好度 76/100
apache/cloudstack#14719 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 77/100
apache/cloudstack#14715 ·
维护者通常 1 天内回复
-
resizeVolume of a running system VM's volume is accepted but the VM never sees the new size可能已有人在做 @bhouse-nexthop 于 7 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 72/100
apache/cloudstack#14645 · 1 条评论 ·
维护者通常 1 天内回复
-
VR reports a load balancer change as applied when haproxy.cfg cannot be replaced可能已有人在做 @bhouse-nexthop 于 7 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 78/100
apache/cloudstack#14633 · 1 条评论 ·
维护者通常 1 天内回复
-
restartNetwork reports a ResourceUnavailableException as an unexpected error (530), unlike restartVPC (534)可能已有人在做 @bhouse-nexthop 于 7 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 78/100
apache/cloudstack#14631 · 1 条评论 ·
维护者通常 1 天内回复
查看 apache/cloudstack 的全部 Issue
相似的 Issue
-
难度 1/5 1 小时以内 新手友好度 75/100
SAP/ai-sdk-java#1206 ·
维护者通常 1 天内回复
-
enhancement good first issue insight-module
难度 2/5 1-3 小时 新手友好度 86/100
sdlc-pro/spring-lens#606 ·
维护者通常 1 天内回复
-
quality-assurance
难度 2/5 1-3 小时 新手友好度 62/100
Paul-Austin-Oswego-CSC480-HCI521/gift-app#252 ·
维护者通常 1 天内回复
-
backlog kind/bug
难度 2/5 1-3 小时 新手友好度 83/100
TencentBlueKing/bk-job#4627 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 63/100
openrocket/openrocket#3460 ·
维护者通常 1 天内回复