4.23.0.0: restartVPC cleanup=true with public IPs on two VLANs fails with UnsupportedOperationException and leaves the VPC without a backup router
维护者通常 1 天内回复
@bernardodemarco 已经在做这个了。
开始于 2026年10月28日。
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 78/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- java
调研方向
阅读第 761 行附近的 NetworkHelperImpl.java,然后沿着 publicConfig 的值追踪到第 165 行附近的 VpcNetworkHelperImpl.reallocateRouterNetworks。重现两个 VLAN 的设置和 restartVPC cleanup=true,或者添加一个针对可变列表行为的回归测试。当路由器网络重新分配能够接受两个 VLAN,且滚动重启在有备用路由器的情况下完成时,即为完成。
由索引模型根据 Issue 内容生成。
描述
problem
NetworkHelperImpl.java line 761 (4.23.0.0 and main) is:
publicConfig.put(publicNetworks.get(0), List.of(defaultNic));
List.of returns an immutable list. VpcNetworkHelperImpl.reallocateRouterNetworks (line 165) then calls addAll on it and throws UnsupportedOperationException (ImmutableCollections.addAll), through NetworkHelperImpl.deployRouterWithTemplates (line 542) and VpcManagerImpl.rollingRestartVpc (line 4046). 4.22.0.0 used new ArrayList(Arrays.asList(defaultNic)).
The API answers "Internal Server Error". The rolling restart has already destroyed the backup router, and the new router stays Stopped.
Related: #12621 (fixed by #12622 in 4.22) has the same setup but a different error ("cidr is not formatted correctly"). This one is a separate bug.
versions
CloudStack 4.23.0.0 and main. 4.22.0.0 is not affected. KVM.
The steps to reproduce the bug
- A zone with public IP ranges on two VLANs.
- A redundant VPC with its source NAT IP on the first VLAN.
- Acquire a second public IP from the second VLAN and enable static NAT on it to a VM in the VPC. (A bare IP with no NAT or rule does not reach this code path; see VpcManagerImpl.isIpAllocatedToVpc.)
- restartVPC cleanup=true.
What to do about it?
Use a mutable list again, for example:
publicConfig.put(publicNetworks.get(0), new ArrayList<>(List.of(defaultNic)));
We carry this one-line change. With it, the new routers get NICs on both VLANs and the restart succeeds.
- 主要语言
- Java
- 星标
- 3.1k
- 派生
- 1.4k
- 平均合并
- 10 天 9 小时
- 30 天内合并 PR
- 20
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
apache/cloudstack 的其他 Issue
-
Remote access VPN users are disconnected on every LB, ACL, port forward or firewall change (xl2tpd restarted on every iptables pass)可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭
难度 2/5 1-3 小时 新手友好度 72/100
apache/cloudstack#14545 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
apache/cloudstack#14530 · 1 条评论 ·
维护者通常 1 天内回复
-
bug status:has-work-around
难度 2/5 1-3 小时 新手友好度 78/100
apache/cloudstack#14465 · 1 条评论 ·
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 77/100
apache/cloudstack#14427 · 1 条评论 ·
维护者通常 1 天内回复
-
[UI] "canceled - Unable to reach the management server" notification when switching from project to default view on Instances page (4.20.3)可能已有人在做 @Damans227 于 20 天前认领。 未关闭bug
难度 2/5 1-3 小时 新手友好度 65/100
apache/cloudstack#14381 · 1 条评论 · 1 个 reaction · 已指派 1 人 ·
维护者通常 1 天内回复
查看 apache/cloudstack 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 3 天内回复
-
A proxy that fails to start logs a RejectedExecutionException stack trace from its shutdown hook未关闭follow-up
难度 2/5 1-3 小时 新手友好度 62/100
Sanne/incus-spawn#1953 ·
维护者通常 1 天内回复
-
enhancement
难度 2/5 1-3 小时 新手友好度 66/100
Shweit/EtherealPortals#30 ·
-
难度 1/5 1 小时以内 新手友好度 70/100
checkstyle/checkstyle#22398 · 1 条评论 ·
维护者通常 1 天内回复
-
Typo in jakartaee-bom 12.0.0-SNAPSHOT with cdi可能已有人在做 @ElectLive 今天认领。 未关闭
难度 1/5 1 小时以内 新手友好度 80/100
jakartaee/jakartaee-api#205 · 1 条评论 ·