[systemd-devel] systemd-logger and external syslog daemon

Mike Kazantsev mk.fraggod at gmail.com
Thu Mar 10 10:08:00 PST 2011


On Thu, 10 Mar 2011 19:14:29 +0300
Andrey Borzenkov <arvidjaar at mail.ru> wrote:

> On Wed, Feb 23, 2011 at 10:48 AM, Mike Kazantsev <mk.fraggod at gmail.com> wrote:
> 
> > How the kmsg-syslogd->rsyslog migration (for systemd output) is supposed
> > to work?
> >
> 
> As I just went through all of it ...
> 
> you absolutely need rsyslog that supports passing sockets from
> systemd. Otherwise it is race condition - rsyslog will remove and
> recreate /dev/log on activation so you end up with
> 

The behaviour I've described is what actually happened to me with git
version of rsyslog from the master branch (that's what I meant by
"latest scm version") - it's 6-git version.
If that doesn't support passsing sockets from systemd, I don't think any
other version does ;)

I seem to be doing something wrong there though, since it obviously
doesn't work for me.

Checking rsyslog build system I probably found my mistake - since I've
used local unit files and not the ones shipped upstream, I didn't had
"--with-systemdsystemunitdir=DIR" enabled, and that option, despite the
name, seem to affect all aspects of rsyslog-systemd integration, not
just installing unit files.

Gotta test it, but looks like that's what I've been missing, thanks for
pushing me into the right direction.


> a) some processes still connected to removed /dev/log and passing
> messages to /dev/kmsg this way
> 
> b) losing some messages for as long as /dev/log does not exist
> 
> Unless you have rsyslog that really supports  it - do not stop
> systemd-kmsg-syslogd! It will result in process blocking on accessing
> it creating all sorts of interesting deadlocks. I managed to
> completely lock out any user this way ... :)

Yes, I've seen that as well, although never starting kmsg-syslogd seem
to work without problems for cases of uncooperative syslogd.


-- 
Mike Kazantsev // fraggod.net
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/systemd-devel/attachments/20110310/6e26481f/attachment-0001.pgp>


More information about the systemd-devel mailing list