-
-
Notifications
You must be signed in to change notification settings - Fork 104
Open
Description
Foreword
We face multiple starts on the kafka cluster while setting bootstrapping a kafka broker with an existing log.dirs directory.
👻 Brief Description
Setup:
- An external disk acts as a persistent storage for log.dirs directory.
- A new VM with no installation of kafka.
- kafka.automatic_restart: true
Bug: - When the kafka recipe is run. Since, there's no kafka service running on the broker. kafka service resource starts up the kafka service.
- Since, automatic_restart: true, the service also is notified to perform a delayed restart.
- Since, the delayed restart is sent in close proximity to the start signal. The restart triggers an unclean shutdown on the kafka broker.
🥞 Cookbook version
Observed in version: 2.2.2, should be replicable in latest version as well.
👩🍳 Chef-Infra Version
12.96
Version of chef-client in your environment.
🎩 Platform details
Ubuntu 20.04
GCP
Steps To Reproduce
Steps to reproduce the behavior:
- Shut down kafka broker.
- Make some changes to any file monitored by automatic_restart flag, example server.properties.
- Try running chef-client
- Kafka starts up, and a SIGTERM is sent even before the start is complete.
🚓 Expected behavior
The kafka service should start only once. And should not be restarted.
Possible solution for 2.2.2:
- Initialise a node state in
coordinate-kafka-startwhich points that the service is marked for restart. - skip_start from the kafka_service_actions if that node state is set to true.
- I can raise a possible PR with the same solution.
- The solution is possible for v2.2.2 because the
coordinate-kafka-startblock is called immediately in v2.2.2
Metadata
Metadata
Assignees
Labels
No labels