KRaft: adding a controller role group can bootstrap a second quorum

未关闭
#1,060 0 条评论 0 个 reaction 已指派 1 人 在 GitHub 查看

维护者通常 1 天内回复

@razvan 已经在做这个了。

开始于 2026年11月13日。

  • #1061 来自 @razvan —— 未关闭

评估

这个 Issue 还没有评估数据。

描述

type/bug
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's quorum-manager sees 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
  1. Create a KRaft KafkaCluster with a default controller role group (3 replicas) and a broker role group.
  2. Add a controller role group named extra with 1 replica.
  3. Run kafka-metadata-quorum.sh describe --replication against extra-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 模板
  • 没有贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

stackabletech/kafka-operator 的其他 Issue

查看 stackabletech/kafka-operator 的全部 Issue

相似的 Issue

更多 Rust Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。