Closed jbnjohnathan closed 11 months ago
You should configure the _cample config you shared as code, otherwise it is unreadable.
You should configure the _cample config you shared as code, otherwise it is unreadable.
Doh, thanks. Fixed now
I don't think this should be in .spec.kafka.config
. There should be only the configuration metrics reporter and I do not think that is provided by it.
@kyguy Any idea?
I don't think this should be in
.spec.kafka.config
. There should be only the configuration metrics reporter and I do not think that is provided by it.@kyguy Any idea?
No I didn't think so either.
Just to be clear, I first tried only with spec.cruiseControl.config.sample.store.topic.replication.factor: 3
When that didn't work I also tried adding it to spec.kafka.config
just to try even if I didn't think this would make any difference.
@jbnjohnathan
spec.cruiseControl.config.sample.store.topic.replication.factor
This is the correct place. That being said, the replication factor of the topic cannot be updated after initial creation. So if you create a cluster without this config in the right place, those topics will be created with the default replication factor value of 2
.
When you have existing topics:
strimzi.cruisecontrol.modeltrainingsamples
strimzi.cruisecontrol.partitionmetricsamples
and want to update their replication factor,
spec.cruiseControl.config.sample.store.topic.replication.factor
to desired valuestrimzi.cruisecontrol.modeltrainingsamples
and strimzi.cruisecontrol.partitionmetricsamples
topics. Cruise Control will then create them with the value specified in spec.cruiseControl.config.sample.store.topic.replication.factor
.
@jbnjohnathan
spec.cruiseControl.config.sample.store.topic.replication.factor
This is the correct place. That being said, the replication factor of the topic cannot be updated after initial creation. So if you create a cluster without this config in the right place, those topics will be created with the default replication factor value of
2
.When you have existing topics:
strimzi.cruisecontrol.modeltrainingsamples strimzi.cruisecontrol.partitionmetricsamples
and want to update their replication factor,
- Set
spec.cruiseControl.config.sample.store.topic.replication.factor
to desired value- Delete the
strimzi.cruisecontrol.modeltrainingsamples
andstrimzi.cruisecontrol.partitionmetricsamples
topics.Cruise Control will then create them with the value specified in
spec.cruiseControl.config.sample.store.topic.replication.factor
.
Yeah exactly. I hope it was clear in my issue description that I did set it in spec.cruiseControl.config.sample.store.topic.replication.factor
and I did it before creating the cluster.
Yeah exactly. I hope it was clear in my issue description that I did set it in spec.cruiseControl.config.sample.store.topic.replication.factor and I did it before creating the cluster.
Did a cluster exist in the same namespace where the new cluster was created? If so, were the KafkaTopic
resources used by that cluster deleted explicitly as well?
Deleting a Kafka
resource does not delete the KafkaTopics
created by that cluster. So if the KafkaTopic
resources were not deleted explicitly, the new cluster is going to use the existing KafkaTopic
resources (which have the old/default replication factor configuration)
@kyguy You were correct, even though I removed the cluster in between testing the kafkaTopic
remained and this is why it never changed. Thanks!
Bug Description
When creating a kafka cluster using Strimzi there are two cruise control topics created. I want them to have an initial replication factor of 3.
I have set the value
cruiseControl.config.sample.store.topic.replication.factor: 3
in the kafka cr manifest. Then I create a new kafka cluster using strimzi. However the replication factor is still set to2
.According to https://github.com/linkedin/cruise-control/wiki/Configurations#kafkasamplestore-configurations the
KafkaSampleStore
has a property with namesample.store.topic.replication.factor
with a default value of2
.Since there is another issue indicating that some cruseControl settings live under
kafka.config
I also tried to set it hereBut still the two topics are created with a replication factor of
2
Steps to reproduce
Expected behavior
Expected the replication factor for the two topics to be
3
but it is2
Strimzi version
0.35.1
Kubernetes version
1.25
Installation method
Helm
Infrastructure
OpenShift on premise
Configuration files and logs
Additional context
According to https://github.com/strimzi/strimzi-kafka-operator/issues/4268 setting
sample.store.topic.replication.factor
undercruiseControl.config
should produce the expected result.