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

Ouverte
#1,060 0 commentaires 0 réactions 1 personne assignée Voir sur GitHub

Les mainteneurs répondent en général sous 1 jour

@razvan y travaille déjà.

Depuis le 13/11/2026.

  • #1061 par @razvan — ouverte

Évaluation

Cette issue n'a pas encore été évaluée.

Description

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.
Langage dominant
Rust
Étoiles
31
Forks
9
Merge moyen
4 j 5 h
PR mergées (30 j)
14

Préparer son environnement

  • Aucun Dockerfile ni fichier Docker Compose
  • Propose un modèle de pull request
  • Aucun guide de contribution

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de stackabletech/kafka-operator

Toutes les issues de stackabletech/kafka-operator

Issues similaires

Plus d'issues Rust

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.