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

Reload with systemctl load-or-restart if available #57

Closed
wants to merge 1 commit into from

Conversation

juliantaylor
Copy link

Systemd offers a more robust way of reloading prometheus than pkill.

Systemd offers a more robust way of reloading prometheus than pkill.
@juliantaylor
Copy link
Author

An issue with this approach to reloading (including the pkill method) is that when you change for example the commandline arguments in the init scripts it won't restart prometheus.

@@ -10,13 +10,18 @@
default => 'prometheus',
}

$restart_cmd = $prometheus::init_style ? {
'systemd' => "systemctl reload-or-restart ${init_selector}",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this work or should it be a fully qualified path?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it works on debian jessie, the existing manifests/config.pp also calls systemctl unqualified.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Then 👍 because I know the path can differ (/bin/systemctl on Fedora and Jessie, /usr/bin/systemctl on Gentoo).

@juliantaylor
Copy link
Author

#43 looks like a better solution to reloading and will cause a minor conflict with this. Depending on whether you want to merge that one you may want to skip this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants