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

Đang mở
#1,060 0 bình luận 0 reaction 1 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

@razvan đang làm issue này rồi.

Từ ngày 13/11/2026.

  • #1061 của @razvan — đang mở

Đánh giá

Issue này chưa được đánh giá.

Mô tả

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.
Ngôn ngữ chính
Rust
Star
31
Fork
9
Merge trung bình
4 ngày 5 giờ
Pull request đã merge (30 ngày)
14

Chuẩn bị môi trường

  • Không có Dockerfile hay tệp Docker Compose
  • Có mẫu pull request
  • Không có hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của stackabletech/kafka-operator

Tất cả issue của stackabletech/kafka-operator

Issue tương tự

Thêm issue về Rust

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.