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

Aperta
#1,060 0 commenti 0 reazioni 1 assegnatario Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@razvan ci sta già lavorando.

Dal 13/11/2026.

  • #1061 di @razvan — aperta

Valutazione

Questa issue non è ancora stata valutata.

Descrizione

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.
Lingua principale
Rust
Stelle
31
Fork
9
Merge medio
4g 5h
PR unite (30g)
14

Preparare l'ambiente

  • Nessun Dockerfile né file Docker Compose
  • Ha un modello di pull request
  • Nessuna guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di stackabletech/kafka-operator

Tutte le issue di stackabletech/kafka-operator

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.