KRaft: adding a controller role group can bootstrap a second quorum
維護者通常 1 天內回覆
評估
這個 Issue 還沒有評估資料。
描述
Description
In KRaft mode, exactly one controller formats its storage with --standalone and bootstraps the metadata quorum. All other controllers join it later through the quorum-manager
sidecar. This was introduced in #1010, which is not released yet.
The operator picks the bootstrap controller as the one with the lowest node.id in the current spec. Node IDs come from a hash of the role group name, so a controller role
group added later can get lower node IDs than the existing ones. Its first pod starts with an empty volume, formats with --standalone, and becomes the leader of a second,
single-voter quorum under the same cluster ID.
This is not an edge case: any second controller role group added next to it triggers the bug.
Impact
- The new controller never joins the real quorum and keeps its own metadata log under the same cluster ID.
- Nothing in the cluster status shows the problem. The KafkaCluster stays
Available, and the new controller'squorum-managersees itself as leader and does nothing. - Brokers that are already connected stay on the original quorum, so clients keep working. If the original controller role group is removed later, the brokers crash-loop.
- As a side effect, adding such a role group changes the start command of every existing controller, which restarts all of them.
Steps to reproduce
- Create a KRaft KafkaCluster with a
defaultcontroller role group (3 replicas) and a broker role group. - Add a controller role group named
extrawith 1 replica. - Run
kafka-metadata-quorum.sh describe --replicationagainstextra-0. It reports a single-voter quorum led by itself, not the original quorum with 4 voters.
Known limitations (out of scope)
- If the status is lost, the operator chooses the bootstrap controller again from the current spec.
- 主要語言
- Rust
- 星號
- 31
- 分支
- 9
- 平均合併
- 4 天 5 小時
- 30 天內合併 PR
- 14
環境準備
- 沒有 Dockerfile 或 Docker Compose 檔案
- 有 Pull Request 範本
- 沒有貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
stackabletech/kafka-operator 的其他 Issue
-
Use mTLS instead of Kerberos for KRaft inter-node traffic可能已有人在做 @razvan 於 1 天前認領。 未關閉type/internal-improvement
stackabletech/kafka-operator#1066 · 已指派 1 人 ·
維護者通常 1 天內回覆
-
KRaft: a new controller can bootstrap against itself and never join the quorum可能已有人在做 @razvan 於 1 天前認領。 未關閉type/bug
stackabletech/kafka-operator#1062 · 已指派 1 人 ·
維護者通常 1 天內回覆
-
難度 4/5 3-5 天 新手友好度 30/100
stackabletech/kafka-operator#1059 ·
維護者通常 1 天內回覆
-
難度 4/5 3-5 天 新手友好度 35/100
stackabletech/kafka-operator#1058 ·
維護者通常 1 天內回覆
-
type/bug
難度 5/5 一週以上 新手友好度 35/100
stackabletech/kafka-operator#955 · 1 則留言 ·
維護者通常 1 天內回覆
查看 stackabletech/kafka-operator 的全部 Issue
相似的 Issue
-
ライブラリを追加未關閉priority middle
難度 1/5 1 小時以內 新手友好度 62/100
KATO-Hiro/AtCoderClans#13015 ·
維護者通常 1 天內回覆
-
needs-review
難度 2/5 1-3 小時 新手友好度 70/100
UCS-Care-Group/mailcraft#1429 ·
維護者通常 1 天內回覆
-
priority: medium ready
難度 1/5 1 小時以內 新手友好度 88/100
TusanHomichi/PSIV#646 ·
維護者通常 1 天內回覆
-
難度 1/5 1 小時以內 新手友好度 70/100
維護者通常 1 天內回覆
-
area:tui bug P1
難度 2/5 1-3 小時 新手友好度 62/100
agent-of-empires/agent-of-empires#5705 · 1 則留言 ·
維護者通常 1 天內回覆