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

Restart telegraf service if it is already running and upgraded via RPM #3516

Closed
druchoo opened this issue Nov 28, 2017 · 5 comments · Fixed by #9970
Closed

Restart telegraf service if it is already running and upgraded via RPM #3516

druchoo opened this issue Nov 28, 2017 · 5 comments · Fixed by #9970

Comments

@druchoo
Copy link

druchoo commented Nov 28, 2017

Feature Request

If RPM package is upgraded and the telegraf service is running have postscript restart service.

Proposal:

Current behavior:

Service is not restarted if already running and upgraded via RPM

Desired behavior:

Restart service if it is already running and upgraded via RPM

Use case: [Why is this important (helps with prioritizing requests)]

According to https://fedoraproject.org/wiki/Packaging:Scriptlets#Systemd

On upgrade, a package may only restart a service if it is running; it may not start it if it is off.

I think restarts were removed from #3015?

This behavior is probably a matter of preference but the reasoning is if you're upgrading telegraf it is intentional and you want to use the new version. Currently a manual restart is needed if the service is already running and an upgrade is performed.

@danielnelson
Copy link
Contributor

Which distro and distro version are you using?

@druchoo
Copy link
Author

druchoo commented Nov 28, 2017

CentOS Linux release 7.2.1511 (Core) and telegraf 1.4.x

@sparr
Copy link

sparr commented Jan 17, 2018

There is a restart with the .deb package upgrade, so this is at best an inconsistency between different packagings of the same version.

@danielnelson
Copy link
Contributor

I'm okay with the rpm and deb packages behaving differently, but they should follow guidelines from debian and redhat. One example is that in debian a service is generally started on install, while on redhat you need to manually enable it.

@nerijus
Copy link
Contributor

nerijus commented Oct 21, 2021

I'm okay with the rpm and deb packages behaving differently, but they should follow guidelines from debian and redhat. One example is that in debian a service is generally started on install, while on redhat you need to manually enable it.

Yes, but we are talking about restarting service when it is already running before update. It should restart in such case, all other services do that and Fedora guidelines suggests it.

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

Successfully merging a pull request may close this issue.

4 participants