Yolean / kubernetes-kafka

Kafka cluster as Kubernetes StatefulSet, plain manifests and config
Apache License 2.0
1.83k stars 738 forks source link

Zookeeper properties file needs an empty line at the end of the file #321

Closed senzzzi closed 4 years ago

senzzzi commented 4 years ago

I am not sure this is an issue that needs a fix, but maybe a comment on the zookeeper.properties file would be enough. If the zookeeper.properties file doesn't have an empty line, the properties file is wrong and then zookeeper with id 1 is not recognized because it's not part of the cluster.


#server.2=zoo-1.zoo:2888:3888:participant
#server.3=zoo-2.zoo:2888:3888:participant
#server.4=zoo-3.zoo:2888:3888:participant
#server.5=0.0.0.0:2888:3888:participantserver.1=zoo-0.zoo:2888:3888:participant
server.2=zoo-1.zoo:2888:3888:participant
server.3=zoo-2.zoo:2888:3888:participant
server.4=zoo-3.zoo:2888:3888:participant
server.5=0.0.0.0:2888:3888:participant
solsson commented 4 years ago

It's an important observation because the cluster will seemingly work but be less resilient to lost pods. What revision or variant do you run? https://github.com/Yolean/kubernetes-kafka/blob/master/zookeeper/10zookeeper-config.yml#L24 should produce a trailing newline, unlike |-.

senzzzi commented 4 years ago

We are using a custom variant with 5 zookeeper (the non-persistent ones with regionally replicated volumes). We also copied the zookeeper.properties file ourselves and we are adding our version to the configmap. That's how I was able to remove the line from the properties file.

solsson commented 4 years ago

These yaml tricks are non-obvious :)