KRaft: a new controller can bootstrap against itself and never join the quorum

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

维护者通常 1 天内回复

@razvan 已经在做这个了。

开始于 2026年11月13日。

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

评估

这个 Issue 还没有评估数据。

描述

type/bug
Description

A controller that starts without metadata (a new pod, e.g. after scaling up a controller role group) finds the quorum leader through controller.quorum.bootstrap.servers. Outside Kerberos, that list has one entry per controller role group: the role group's headless Service. That Service sets publishNotReadyAddresses: true, so the name also resolves to the starting pod's own IP.

Kafka treats each entry in controller.quorum.bootstrap.servers as one bootstrap node and resolves its name when it connects. If the starting pod's lookup returns its own IP, the connection succeeds, so Kafka never tries another address. The pod asks itself for the leader, gets no answer, and repeats this forever.

This is a race in the quorum management added in #1010.

Symptoms
  • The new controller stays in Raft state unattached (epoch 0) and never becomes an observer. The quorum's replication status doesn't list it at all.
  • Its quorum-manager sidecar logs Local Raft state is 'unattached', nothing to do indefinitely, so it never calls add-controller.
  • The kafka container never becomes ready, and the StatefulSet rollout stalls. Because the StatefulSet uses OrderedReady, later replicas are not created either.
  • The pod's only connections on the controller port go to its own IP.
  • Deleting the pod usually clears it: the replacement resolves another IP and joins normally.
主要语言
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 摘要。