Bug 790387 - rsyslogd ignore localn.none
Summary: rsyslogd ignore localn.none
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: dhcp
Version: 16
Hardware: i686
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Jiri Popelka
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-02-14 12:08 UTC by Kapetanakis Giannis
Modified: 2014-05-07 12:27 UTC (History)
2 users (show)

Fixed In Version: dhcp-4.2.3-8.P2.fc16
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-04-12 02:35:19 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Kapetanakis Giannis 2012-02-14 12:08:02 UTC
Hi,

I have the following configuration in /etc/rsyslog.conf
# grep messages /etc/rsyslog.conf

*.info;mail.none;authpriv.none;cron.none;local3.none;local6.none        /var/log/messages

# grep local /etc/rsyslog.conf

*.info;mail.none;authpriv.none;cron.none;local3.none;local6.none        /var/log/messages
local7.*                        /var/log/boot.log
local6.*                        /var/log/snmpd.log
local3.*                        /var/log/dhcpd.log

/etc/dhcp/dhcpd.conf has
log-facility local3;

In one machine dhcp logs get only in /var/log/dhcpd.conf
In another machine (same OS/same patches) dhcp logs
get both in /var/log/dhcpd.conf and /var/log/messages.

It seems that *.info does the harm. If I remove it then I don't have dhcp logs in /var/log/messages but also no logs...

root     31573  0.0  0.0  29936  1396 ?        Ssl  13:57   0:00 /sbin/rsyslogd -n -c 5 -f /etc/rsyslog.conf

Any ideas?

regards,

Giannis

Comment 1 Tomas Heinrich 2012-02-21 14:17:52 UTC
Are you sure dhcpd doesn't produce messages with any other facility?
This can happen according to the man page (dhcpd.conf(5)).

You can also do a simple test:

On the affected machine,
add to /etc/rsyslog.conf:
  local3.error        /tmp/l3.err
  *.error;local3.none /tmp/not-l3.err
and run:
  $ logger -p local3.error msg-l3.err
  $ logger -p local4.error msg-not-l3.err

This simple scenario should represent the core of the problem.
Each message should end up only in the respective file.

Comment 2 Kapetanakis Giannis 2012-02-21 14:41:56 UTC
Apparently the problem was in dhcpd and not in rsyslog.
It needed the startup option -q in /etc/sysconfig/dhcpd
...

Your test worked as it should.

thanks

Giannis

Comment 3 Jiri Popelka 2012-02-21 18:07:46 UTC
(In reply to comment #2)
> Apparently the problem was in dhcpd and not in rsyslog.
> It needed the startup option -q in /etc/sysconfig/dhcpd

Hmmm, the -q (quiet) also partly solves the problem I've seen on F16 and that is that /var/log/messages now contains each dhcpd log message twice (where one of them has [PID] and one not), see for example this:

Feb 21 18:41:13 zepelin dhcpd: Internet Systems Consortium DHCP Server 4.2.3-P2
Feb 21 18:41:13 zepelin dhcpd[13500]: Internet Systems Consortium DHCP Server 4.2.3-P2
Feb 21 18:41:13 zepelin dhcpd: Copyright 2004-2012 Internet Systems Consortium.
Feb 21 18:41:13 zepelin dhcpd[13500]: Copyright 2004-2012 Internet Systems Consortium.
Feb 21 18:41:13 zepelin dhcpd: All rights reserved.
Feb 21 18:41:13 zepelin dhcpd[13500]: All rights reserved.


I have no idea what causes this as it was ok with F15.
I'll try to finally investigate this more.

Comment 4 Jiri Popelka 2012-02-22 16:06:54 UTC
So I hopefully solved the problem described in previous comment.

dhcpd logs all output using syslog(3) and also sends log messages to the standard error descriptor.
Logging to stderr could be omited either by using "-q" or (as I understand the "-f" and "-d" description in dhcpd(8)) by using "-f".
Problem is that "-f" and "-d" behaves the same which I think is bug. I reported that upstream and built new packages [1] with a fix.

But I have no idea why in F16 (unlike F15) /var/log/messages contains messages that dhcpd writes to stderr.
I guess it's something to do with systemd.
Or does Tomas have any clue ?

Anyway I hope the fix solves also the Kapetanakis' problem because it should now work the same way as with the "-q" switch.

[1] http://koji.fedoraproject.org/koji/taskinfo?taskID=3810301

Comment 5 Tomas Heinrich 2012-02-23 12:25:10 UTC
(In reply to comment #4)

> dhcpd logs all output using syslog(3) and also sends log messages to the
> standard error descriptor.

> But I have no idea why in F16 (unlike F15) /var/log/messages contains messages
> that dhcpd writes to stderr.
> I guess it's something to do with systemd.
> Or does Tomas have any clue ?

Precisely.
The change in f16 is mentioned here:
https://bugzilla.redhat.com/show_bug.cgi?id=734547#c2

Comment 6 Fedora Update System 2012-03-21 19:01:25 UTC
dhcp-4.2.3-22.P2.fc17 has been submitted as an update for Fedora 17.
https://admin.fedoraproject.org/updates/dhcp-4.2.3-22.P2.fc17

Comment 7 Fedora Update System 2012-03-23 00:43:59 UTC
Package dhcp-4.2.3-22.P2.fc17:
* should fix your issue,
* was pushed to the Fedora 17 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing dhcp-4.2.3-22.P2.fc17'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2012-4532/dhcp-4.2.3-22.P2.fc17
then log in and leave karma (feedback).

Comment 8 Fedora Update System 2012-03-23 18:18:42 UTC
dhcp-4.2.3-23.P2.fc17 has been submitted as an update for Fedora 17.
https://admin.fedoraproject.org/updates/dhcp-4.2.3-23.P2.fc17

Comment 9 Fedora Update System 2012-04-12 02:35:19 UTC
dhcp-4.2.3-24.P2.fc17 has been pushed to the Fedora 17 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 10 Fedora Update System 2012-04-17 11:06:25 UTC
dhcp-4.2.3-8.P2.fc16 has been submitted as an update for Fedora 16.
https://admin.fedoraproject.org/updates/dhcp-4.2.3-8.P2.fc16

Comment 11 Fedora Update System 2012-05-03 07:24:04 UTC
dhcp-4.2.3-8.P2.fc16 has been pushed to the Fedora 16 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 12 Jiri Popelka 2014-05-07 12:27:20 UTC
(In reply to Jiri Popelka from comment #4)
> dhcpd logs all output using syslog(3) and also sends log messages to the
> standard error descriptor.
> Logging to stderr could be omited either by using "-q" or (as I understand
> the "-f" and "-d" description in dhcpd(8)) by using "-f".
> Problem is that "-f" and "-d" behaves the same which I think is bug.

After discussion with upstream we decided to not change the "-f" behavior.
I've added 'StandardError=null' to *.service files which should fix the original problem just fine.
http://pkgs.fedoraproject.org/cgit/dhcp.git/commit/?id=6756a54bda978fadccc376f5853f3aced7136b91


Note You need to log in before you can comment on or make changes to this bug.