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 小時以內 新手友好度 70/100
Vakore/ZappierGames#248 ·
-
難度 2/5 1-3 小時 新手友好度 66/100
thelastpickle/cassandra-reaper#1748 ·
維護者通常 1 天內回覆
-
難度 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 天內回覆
-
難度 1/5 1 小時以內 新手友好度 72/100
OneBusAway/maglev#1917 · 1 則留言 ·
維護者通常 3 天內回覆