sous-chefs / kafka

Development repository for the kafka cookbook
https://supermarket.chef.io/cookbooks/kafka
Apache License 2.0
91 stars 105 forks source link

Double starts while upgrading an existing broker with new setup. #196

Open punit-kulal opened 3 years ago

punit-kulal commented 3 years ago

Foreword

We face multiple starts on the kafka cluster while setting bootstrapping a kafka broker with an existing log.dirs directory.

:ghost: Brief Description

Setup:

:pancakes: Cookbook version

Observed in version: 2.2.2, should be replicable in latest version as well.

:woman_cook: Chef-Infra Version

12.96

Version of chef-client in your environment.

:tophat: Platform details

Ubuntu 20.04 GCP

Steps To Reproduce

Steps to reproduce the behavior:

  1. Shut down kafka broker.
  2. Make some changes to any file monitored by automatic_restart flag, example server.properties.
  3. Try running chef-client
  4. Kafka starts up, and a SIGTERM is sent even before the start is complete.

:police_car: Expected behavior

The kafka service should start only once. And should not be restarted.

Possible solution for 2.2.2: