Handle redeployments
Maintainers usually reply within 8 days
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- kubernetes, rust
- Domain
- distributed-systems, infrastructure
Research direction
Start by reproducing the apply, delete, and reapply sequence with the provided ZookeeperCluster, ZookeeperZnode, and KafkaCluster manifests, then trace how persistent volumes and cluster identity are handled during reconciliation. Done means the second deployment starts successfully without the InconsistentClusterIdException, or the issue documents a confirmed limitation and required recovery behavior.
Written by the indexing model from the issue text.
Description
Affected version
kafka-operator 0.5.0 and zk-operator 0.9.0
Current and expected behavior
If i apply, delete and apply the following stackable crds the kafka cluster works for the first apply but not anymore for the second time.
---
apiVersion: zookeeper.stackable.tech/v1alpha1
kind: ZookeeperCluster
metadata:
name: simple-zk
spec:
version: 3.8.0
servers:
roleGroups:
default:
replicas: 3
config: {}
---
apiVersion: zookeeper.stackable.tech/v1alpha1
kind: ZookeeperZnode
metadata:
name: simple-kafka-znode
spec:
clusterRef:
name: simple-zk
namespace: default
---
apiVersion: kafka.stackable.tech/v1alpha1
kind: KafkaCluster
metadata:
name: simple-kafka
spec:
version: 3.1.0
zookeeperConfigMapName: simple-kafka-znode
brokers:
roleGroups:
default:
replicas: 3
In the logs i can find the following error message:
[2022-04-26 14:21:18,645] ERROR Fatal error during KafkaServer startup. Prepare to shutdown (kafka.server.KafkaServer)
kafka.common.InconsistentClusterIdException: The Cluster ID dOMtDqQ_QU6rqOpOeyosIA doesn't match stored clusterId Some(7tfltX7ATz-aIURko5dtnQ) in meta.properties. The broker is trying to join the wrong cluster. Configured zookeeper.connect may be wrong.
at kafka.server.KafkaServer.startup(KafkaServer.scala:228)
at kafka.Kafka$.main(Kafka.scala:109)
at kafka.Kafka.main(Kafka.scala)
Problem is that the ZKCluster ID gets saved in the first apply. Since the volumes are persistent over kubectl delete -f kafka.yaml and the ZKCluster generates a new ID on the redeploy the Kafka cluster is stuck.
Possible solution
I am wondering why ZK gets a new ClusterID on every restart. Shouldnt the ID be fixed since the data inside the Cluster doesn't change (persistent volumes)?
If the id change is inevitable the Kafka cluster should tolerate the ID change of the ZKCluster.
Additional context
No response
Environment
Client Version: v1.23.6
Server Version: v1.22.6
Would you like to work on fixing this bug?
yes
- Dominant language
- Rust
- Stars
- 28
- Forks
- 8
- Avg merge
- 2d 21h
- Merged PRs (30d)
- 12
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- No contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from stackabletech/kafka-operator
-
type/bug
Difficulty 5/5 Over a week Newbie friendliness 35/100
stackabletech/kafka-operator#955 · 1 comment ·
Maintainers usually reply within 8 days
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
stackabletech/kafka-operator#941 ·
Maintainers usually reply within 8 days
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
stackabletech/kafka-operator#874 ·
Maintainers usually reply within 8 days
-
Kafka 4.xMay be free again @razvan claimed this 349 days ago, and no pull request is open. Openrefinement-needed
stackabletech/kafka-operator#870 · 5 comments · 2 assignees ·
Maintainers usually reply within 8 days
-
customer-request
Difficulty 4/5 3-5 days Newbie friendliness 30/100
stackabletech/kafka-operator#859 ·
Maintainers usually reply within 8 days
All issues in stackabletech/kafka-operator
Similar issues
-
area:casework bug criticality:p3 triage:needs-implementation
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
registrystack/registry-stack#1623 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
leptos-rs/leptos#4885 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
longbridge/gpui-kit#3276 ·
Maintainers usually reply within 1 day
-
A-Migration Guides D-Straightforward S-Ready-For-Implementation X-Uncontroversial
Difficulty 1/5 Under an hour Newbie friendliness 88/100
bevyengine/bevy-website#2607 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day