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

[dev.icinga.com #10935] Logrotate on systemd distros should use systemctl not service #3818

Closed
icinga-migration opened this issue Jan 6, 2016 · 11 comments
Labels
bug Something isn't working
Milestone

Comments

@icinga-migration
Copy link

This issue has been migrated from Redmine: https://dev.icinga.com/issues/10935

Created by sysadmiral on 2016-01-06 11:37:50 +00:00

Assignee: jflach
Status: Resolved (closed on 2016-01-21 09:17:21 +00:00)
Target Version: 2.4.2
Last Update: 2016-02-23 09:58:38 +00:00 (in Redmine)

Icinga Version: 2.4.1
Backport?: Already backported
Include in Changelog: 1

Hi,

On a distro that uses systemd (in my case RHEL 7) the service command has been replaced with systemctl.

The logrotate commands for icinga2 use "service icinga2 status" but this generates lots of anacron "spam" because it gets redirected to systemctl.

Either the logrotate needs updating (for systemd systems only) to use systemctl or we need to /dev/null stderr for the "service icinga2 status" command. I am happy to create a pull request for the latter but I am unfamiliar with cmake and would not feel confident in setting up the logic for the first option.

If you need more info let me know.

Many Thanks,

Amo

Changesets

2016-01-21 09:12:43 +00:00 by leeclemens 7bf012c

Reload logs after logrotate across distros

Signed-off-by: Jean Flach <jean-marcel.flach@netways.de>

fixes #10935

2016-02-23 08:27:30 +00:00 by leeclemens ea2aedb

Reload logs after logrotate across distros

Signed-off-by: Jean Flach <jean-marcel.flach@netways.de>

fixes #10935

Relations:

@icinga-migration
Copy link
Author

Updated by jflach on 2016-01-07 08:50:51 +00:00

  • Status changed from New to Assigned
  • Assigned to set to sysadmiral

Using systemctl on systemd systems would be the right thing to do, but I too do not know how to do this elegantly.

So please go ahead and create a patch (git formated with a real sounding name) for redirecting stderr. :)

Kind regards,
Jean

@icinga-migration
Copy link
Author

Updated by sysadmiral on 2016-01-07 10:41:17 +00:00

#59

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2016-01-11 13:06:43 +00:00

  • Assigned to changed from sysadmiral to jflach

@jean

Please review and merge. Thanks.

@icinga-migration
Copy link
Author

Updated by jflach on 2016-01-14 16:48:15 +00:00

The discussion about this issue is now happening over at github:
#59

@icinga-migration
Copy link
Author

Updated by dgoetz on 2016-01-15 08:00:31 +00:00

Just to mention we already discussed this in https://dev.icinga.org/issues/10730

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2016-01-15 08:02:11 +00:00

  • Relates set to 10730

@icinga-migration
Copy link
Author

Updated by leeclemens on 2016-01-20 00:22:45 +00:00

Bringing discussion back here per @dnsmmichi:

I took a similar approach as syslog, sending USR1 signal and handling errors related to the pid file not being there (and not forcibly starting the service):
#64

@icinga-migration
Copy link
Author

Updated by leeclemens on 2016-01-21 09:17:21 +00:00

  • Status changed from Assigned to Resolved
  • Done % changed from 0 to 100

Applied in changeset 7bf012c.

@icinga-migration
Copy link
Author

Updated by jflach on 2016-01-21 09:24:35 +00:00

  • Target Version set to 2.5.0

leeclemens solution was a lot more attractive.

Both pull requests are now closed

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2016-01-25 10:39:48 +00:00

  • Target Version changed from 2.5.0 to 2.4.2

@icinga-migration
Copy link
Author

Updated by gbeutner on 2016-02-23 09:58:38 +00:00

  • Backport? changed from Not yet backported to Already backported

@icinga-migration icinga-migration added bug Something isn't working Installation labels Jan 17, 2017
@icinga-migration icinga-migration added this to the 2.4.2 milestone Jan 17, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant