Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 442706 - app-admin/rsyslog.service file does not work with newer sys-apps/systemd
Summary: app-admin/rsyslog.service file does not work with newer sys-apps/systemd
Status: RESOLVED TEST-REQUEST
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-11-11 11:50 UTC by Maciej Piechotka
Modified: 2013-09-21 13:39 UTC (History)
2 users (show)

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


Attachments
rsyslog-7.4.3.ebuild.patch (rsyslog-7.4.3.ebuild.patch,5.41 KB, patch)
2013-08-16 21:11 UTC, Sergei Trofimovich
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Maciej Piechotka 2012-11-11 11:50:47 UTC
app-admin/rsyslog .service file does not work with newer sys-apps/systemd as it have line:

ExecStartPre=/bin/systemctl stop systemd-kmsg-syslogd.service

But:

a) systemctl is in /usr/bin 
b) systemd-kmsg-syslogd.service does not exists

Presence of the line result in 100% CPU occupancy from both systemd and journald.
Comment 1 Ultrabug gentoo-dev 2012-11-20 11:53:38 UTC
What is "newer" systemd to you please ? Can you provide some versions ?
Comment 2 Maciej Piechotka 2012-11-21 08:17:42 UTC
(In reply to comment #1)
> What is "newer" systemd to you please ? Can you provide some versions ?

It started around 100-something-ish. For sure in 195.
Comment 3 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2012-11-21 08:22:28 UTC
To be honest, journald seems to catch all syslog messages for me. Any specific reason to use journald+rsyslog nowadays?
Comment 4 Maciej Piechotka 2012-11-21 14:10:11 UTC
(In reply to comment #3)
> To be honest, journald seems to catch all syslog messages for me. Any
> specific reason to use journald+rsyslog nowadays?

Force of habit I guess and lack of familiarity with journald.
Comment 5 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2012-11-22 08:33:40 UTC
(In reply to comment #4)
> (In reply to comment #3)
> > To be honest, journald seems to catch all syslog messages for me. Any
> > specific reason to use journald+rsyslog nowadays?
> 
> Force of habit I guess and lack of familiarity with journald.

Well, i simply didn't have the time and will to investigate how they broke the world this time. If you know how to fix it, I'd be happy to help.
Comment 6 Sergei Trofimovich gentoo-dev 2013-06-02 19:27:24 UTC
(In reply to Michał Górny from comment #3)
> To be honest, journald seems to catch all syslog messages for me. Any
> specific reason to use journald+rsyslog nowadays?

I came here to pipe external sources into journal:

http://www.rsyslog.com/doc/omjournal.html (we don't have 7.3.7 in tree yet though)
Comment 7 Pacho Ramos gentoo-dev 2013-08-07 11:03:02 UTC
(In reply to Sergei Trofimovich from comment #6)
> (In reply to Michał Górny from comment #3)
> > To be honest, journald seems to catch all syslog messages for me. Any
> > specific reason to use journald+rsyslog nowadays?
> 
> I came here to pipe external sources into journal:
> 
> http://www.rsyslog.com/doc/omjournal.html (we don't have 7.3.7 in tree yet
> though)

Looks like ebuild is using upstream service files, is this still valid with 7.4.3?
Comment 8 Sergei Trofimovich gentoo-dev 2013-08-11 07:27:10 UTC
(In reply to Pacho Ramos from comment #7)
> (In reply to Sergei Trofimovich from comment #6)
> > (In reply to Michał Górny from comment #3)
> > > To be honest, journald seems to catch all syslog messages for me. Any
> > > specific reason to use journald+rsyslog nowadays?
> > 
> > I came here to pipe external sources into journal:
> > 
> > http://www.rsyslog.com/doc/omjournal.html (we don't have 7.3.7 in tree yet
> > though)
> 
> Looks like ebuild is using upstream service files, is this still valid with
> 7.4.3?

Well, my use case is quite limited:
I only use rsyslog to pipe messages from my modem to systemd's journal.

It works for me with ebuild extended like that:
Index: rsyslog-7.4.3.ebuild
===================================================================
RCS file: /var/cvsroot/gentoo-x86/app-admin/rsyslog/rsyslog-7.4.3.ebuild,v
retrieving revision 1.1
diff -u -U0 -r1.1 rsyslog-7.4.3.ebuild
--- rsyslog-7.4.3.ebuild        29 Jul 2013 22:00:38 -0000      1.1
+++ rsyslog-7.4.3.ebuild        11 Aug 2013 07:25:41 -0000
@@ -17 +17 @@
-IUSE="dbi debug doc extras kerberos mysql oracle postgres relp snmp ssl static-libs zeromq zlib"
+IUSE="dbi debug doc extras kerberos mysql oracle postgres relp snmp ssl static-libs systemd zeromq zlib"
@@ -102,0 +103 @@
+               $(use_enable systemd omjournal)

The rsyslog config it the following (+ disabled it as a local syslog):

# cat /etc/systemd/system/netlog-modem.socket 
[Unit]
Description=Syslog remote modem Socket

[Socket]
ListenDatagram=514

# cat /etc/systemd/system/netlog-modem.service 
[Unit]
Description=Modem Remote System Logging Service

[Service]
ExecStart=/usr/sbin/rsyslogd -n
Sockets=netlog-modem.socket
StandardOutput=null

[Install]
WantedBy=multi-user.target

// cat /etc/rsyslog.d/modem.conf 
module(load="omjournal") # output module for journal
input(type="imudp" port="514" ruleset="to-systed-journal")
ruleset(name="to-systed-journal") {
    action(type="omjournal")
}
Comment 9 Ultrabug gentoo-dev 2013-08-16 08:43:45 UTC
(In reply to Sergei Trofimovich from comment #8)
> (In reply to Pacho Ramos from comment #7)
> > (In reply to Sergei Trofimovich from comment #6)
> > > (In reply to Michał Górny from comment #3)
> > > > To be honest, journald seems to catch all syslog messages for me. Any
> > > > specific reason to use journald+rsyslog nowadays?
> > > 
> > > I came here to pipe external sources into journal:
> > > 
> > > http://www.rsyslog.com/doc/omjournal.html (we don't have 7.3.7 in tree yet
> > > though)
> > 
> > Looks like ebuild is using upstream service files, is this still valid with
> > 7.4.3?
> 
> Well, my use case is quite limited:
> I only use rsyslog to pipe messages from my modem to systemd's journal.
> 
> It works for me with ebuild extended like that:
> Index: rsyslog-7.4.3.ebuild
> ===================================================================
> RCS file: /var/cvsroot/gentoo-x86/app-admin/rsyslog/rsyslog-7.4.3.ebuild,v
> retrieving revision 1.1
> diff -u -U0 -r1.1 rsyslog-7.4.3.ebuild
> --- rsyslog-7.4.3.ebuild        29 Jul 2013 22:00:38 -0000      1.1
> +++ rsyslog-7.4.3.ebuild        11 Aug 2013 07:25:41 -0000
> @@ -17 +17 @@
> -IUSE="dbi debug doc extras kerberos mysql oracle postgres relp snmp ssl
> static-libs zeromq zlib"
> +IUSE="dbi debug doc extras kerberos mysql oracle postgres relp snmp ssl
> static-libs systemd zeromq zlib"
> @@ -102,0 +103 @@
> +               $(use_enable systemd omjournal)
> 
> The rsyslog config it the following (+ disabled it as a local syslog):
> 
> # cat /etc/systemd/system/netlog-modem.socket 
> [Unit]
> Description=Syslog remote modem Socket
> 
> [Socket]
> ListenDatagram=514
> 
> # cat /etc/systemd/system/netlog-modem.service 
> [Unit]
> Description=Modem Remote System Logging Service
> 
> [Service]
> ExecStart=/usr/sbin/rsyslogd -n
> Sockets=netlog-modem.socket
> StandardOutput=null
> 
> [Install]
> WantedBy=multi-user.target
> 
> // cat /etc/rsyslog.d/modem.conf 
> module(load="omjournal") # output module for journal
> input(type="imudp" port="514" ruleset="to-systed-journal")
> ruleset(name="to-systed-journal") {
>     action(type="omjournal")
> }

I'm no user of systemd so I'd love to have some help to provide support for this. Would you please propose a proper way to go for this and propose a patch against latest ebuild maybe ?

Cheers
Comment 10 Sergei Trofimovich gentoo-dev 2013-08-16 21:11:34 UTC
Created attachment 356248 [details, diff]
rsyslog-7.4.3.ebuild.patch

Enables basic 'omjournal' piping subsystem into systemd's journald.

I'll try to setup rsyslog as systemwide logger on monday
on one of my machines to see what else it needs.
Comment 11 Ultrabug gentoo-dev 2013-09-10 07:51:41 UTC
(In reply to Sergei Trofimovich from comment #10)
> Created attachment 356248 [details, diff] [details, diff]
> rsyslog-7.4.3.ebuild.patch
> 
> Enables basic 'omjournal' piping subsystem into systemd's journald.
> 
> I'll try to setup rsyslog as systemwide logger on monday
> on one of my machines to see what else it needs.

Thanks Sergei, I've added this to the current ~arch bump so you can have a better chance to test and give feedback.

+*rsyslog-7.4.4 (10 Sep 2013)
+
+  10 Sep 2013; Ultrabug <ultrabug@gentoo.org> -rsyslog-5.8.11.ebuild,
+  -rsyslog-5.8.12.ebuild, -rsyslog-5.10.1.ebuild, -rsyslog-6.6.0.ebuild,
+  +rsyslog-7.4.4.ebuild, -files/5-stable/rsyslog.confd,
+  -files/5-stable/rsyslog.initd, -files/5-stable/rsyslog.logrotate,
+  -files/5-stable/rsyslog-gentoo.conf, -files/6-stable/rsyslog.confd,
+  -files/6-stable/rsyslog.initd, -files/6-stable/rsyslog.logrotate,
+  -files/6-stable/rsyslog-gentoo.conf, -files/6-stable/rsyslog6-zeromq.patch:
+  Version bump, fix #467338, work on #442706 for systemd support, drop old and
+  unsupported versions, cleanup
+
Comment 12 Pacho Ramos gentoo-dev 2013-09-21 13:39:57 UTC
(In reply to Ultrabug from comment #11)
> (In reply to Sergei Trofimovich from comment #10)
> > Created attachment 356248 [details, diff] [details, diff] [details, diff]
> > rsyslog-7.4.3.ebuild.patch
> > 
> > Enables basic 'omjournal' piping subsystem into systemd's journald.
> > 
> > I'll try to setup rsyslog as systemwide logger on monday
> > on one of my machines to see what else it needs.
> 
> Thanks Sergei, I've added this to the current ~arch bump so you can have a
> better chance to test and give feedback.
> 
> +*rsyslog-7.4.4 (10 Sep 2013)
> +
> +  10 Sep 2013; Ultrabug <ultrabug@gentoo.org> -rsyslog-5.8.11.ebuild,
> +  -rsyslog-5.8.12.ebuild, -rsyslog-5.10.1.ebuild, -rsyslog-6.6.0.ebuild,
> +  +rsyslog-7.4.4.ebuild, -files/5-stable/rsyslog.confd,
> +  -files/5-stable/rsyslog.initd, -files/5-stable/rsyslog.logrotate,
> +  -files/5-stable/rsyslog-gentoo.conf, -files/6-stable/rsyslog.confd,
> +  -files/6-stable/rsyslog.initd, -files/6-stable/rsyslog.logrotate,
> +  -files/6-stable/rsyslog-gentoo.conf,
> -files/6-stable/rsyslog6-zeromq.patch:
> +  Version bump, fix #467338, work on #442706 for systemd support, drop old
> and
> +  unsupported versions, cleanup
> +