Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 399011 - app-admin/rsyslog-5.8.6 logrotate config not working with systemd service
Summary: app-admin/rsyslog-5.8.6 logrotate config not working with systemd service
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Ultrabug
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-15 17:56 UTC by Denis Lisov
Modified: 2013-04-18 15:20 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Denis Lisov 2012-01-15 17:56:01 UTC
Despite inatalling the systemd service file, rsyslog does not correctly interoperate with logrotate if started from systemd as the /etc/logrotate.d/rsyslog config does not reload the systemd-started rsyslog instance

Reproducible: Always
Comment 1 Ultrabug gentoo-dev 2012-05-22 12:34:37 UTC
Hello Dennis, as I'm no systemd user myself would you maybe have a suggestion on how to handle this properly ?

Thanks
Comment 2 konduryan 2012-08-04 08:38:00 UTC
In /etc/logrotate.d/rsyslog line:

/etc/init.d/rsyslog reload &>/dev/null || true

seems to be changed to:

systemctl reload-or-try-restart rsyslog.service &>/dev/null || true
Comment 3 Tiziano Müller gentoo-dev 2012-10-29 16:10:27 UTC
un-CC'ing myself since I stepped down as co-maintainer of rsyslog
Comment 4 Enrico Tagliavini 2013-04-07 11:01:09 UTC
Same here with rsyslog 7.2.5.

There is another solution, working for both openrc and systemd:

kill -HUP $(cat /run/rsyslogd.pid) &>/dev/null || true

[which is what the openrc init script does].

This change should be applied to rsyslog.logrotate, postrotate command, associated with 2 files syslog and messages
Comment 5 Ultrabug gentoo-dev 2013-04-18 13:25:26 UTC
Thanks guys, enjoy

+*rsyslog-7.2.7 (18 Apr 2013)
+
+  18 Apr 2013; Ultrabug <ultrabug@gentoo.org> files/7-stable/rsyslog.logrotate,
+  +rsyslog-7.2.7.ebuild:
+  fix logrotate for systemd thx to Enrico Tagliavini and Dennis Lissov #399011,
+  version bump
+
Comment 6 Enrico Tagliavini 2013-04-18 15:07:38 UTC
thank you(In reply to comment #5)
> Thanks guys, enjoy
> 
> +*rsyslog-7.2.7 (18 Apr 2013)
> +
> +  18 Apr 2013; Ultrabug <ultrabug@gentoo.org>
> files/7-stable/rsyslog.logrotate,
> +  +rsyslog-7.2.7.ebuild:
> +  fix logrotate for systemd thx to Enrico Tagliavini and Dennis Lissov
> #399011,
> +  version bump
> +

Thank you very much for including the fix
Comment 7 Ultrabug gentoo-dev 2013-04-18 15:14:54 UTC
(In reply to comment #6)
> thank you(In reply to comment #5)
> > Thanks guys, enjoy
> > 
> > +*rsyslog-7.2.7 (18 Apr 2013)
> > +
> > +  18 Apr 2013; Ultrabug <ultrabug@gentoo.org>
> > files/7-stable/rsyslog.logrotate,
> > +  +rsyslog-7.2.7.ebuild:
> > +  fix logrotate for systemd thx to Enrico Tagliavini and Dennis Lissov
> > #399011,
> > +  version bump
> > +
> 
> Thank you very much for including the fix

My pleasure, thanks for your patience. Please not that this has been done on the rsyslog v7 branch only.
Comment 8 Enrico Tagliavini 2013-04-18 15:20:17 UTC
It makes perfect sense for version 7 only. The last time I tried the systemd unit files in branches 5 and 6 they were invalid for the systemd versions in the main portage tree. I have not checked if upstream fixed this or not. The lastest version does work anyway, so this is ok.