Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Notify kafka service to reload on service template change #110

Closed
csghuser opened this issue Aug 23, 2016 · 5 comments
Closed

Notify kafka service to reload on service template change #110

csghuser opened this issue Aug 23, 2016 · 5 comments

Comments

@csghuser
Copy link

csghuser commented Aug 23, 2016

In the section below, if a value is change, for example the ulimit_file parameter, kafka is restarted however the change is not picked up in the case of a systemd service as the service is not reloaded.

template kafka_init_opts[:script_path] do
  source kafka_init_opts[:source]
  owner 'root'
  group 'root'
  mode kafka_init_opts[:permissions]
  variables({
    daemon_name: 'kafka',
    port: node['kafka']['broker']['port'],
    user: node['kafka']['user'],
    env_path: kafka_init_opts[:env_path],
    ulimit: node['kafka']['ulimit_file'],
    kill_timeout: node['kafka']['kill_timeout'],
  })
  helper :controlled_shutdown_enabled? do
    !!fetch_broker_attribute(:controlled, :shutdown, :enable)
  end
  if restart_on_configuration_change?
    notifies :create, 'ruby_block[coordinate-kafka-start]', :immediately
  end
end

Would it be possible to handle this in this section of the code? I am currently attempting to handle it in the coordinate section.

mthssdrbrg added a commit that referenced this issue Aug 23, 2016
If one changes for example the `ulimit` value it won't be picked up on
the next restart of Kafka as `systemd` won't know about it. See #110.
@mthssdrbrg
Copy link
Contributor

@csghuser: ah, nice catch. I've pushed a fix in #111.

@csghuser
Copy link
Author

@mthssdrbrg Brilliant, many thanks for that!

@mthssdrbrg
Copy link
Contributor

@csghuser: it's currently in master but I should be able to get a release in the next day or so. I'll close this when a new release is out.

@mthssdrbrg
Copy link
Contributor

2.1.0 was just released (due on Supermarket shortly).

@lock
Copy link

lock bot commented Apr 25, 2020

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Apr 25, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants