New style permitnonkernelfacility imklog option inside module() doesn't work

Bug #1703987 reported by Andreas Hasenack on 2017-07-12
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Rsyslog
Fix Released
Unknown
rsyslog (Ubuntu)
Low
Andreas Hasenack

Bug Description

artful 8.16.0-1ubuntu5 (which is way behind upstream and debian, btw)

There are two ways to load the imklog module and pass it an option (PermitNonKernelFacility in this case).

a) legacy
$ModLoad imklog
$KLogPermitNonKernelFacility on

b) "new style", also referred to as "v6+":
module(load="imklog" permitnonkernelfacility="on")

For a while the ubuntu package was using a mix: loading the module with the new style, but setting the option via the legacy method. In bug #1531622 this was fixed for yakkety+.

Problem is, upstream isn't honouring the new style option setting due to a bug of its own: https://github.com/rsyslog/rsyslog/issues/477

With the legacy config:
#module(load="imklog" permitnonkernelfacility="on")
$ModLoad imklog
$KLogPermitNonKernelFacility on

I get kernel messages in /var/log/syslog:
root@nsn7:~# grep andreas-was-here /var/log/syslog
root@nsn7:~# echo andreas-was-here > /dev/kmsg
root@nsn7:~# grep andreas-was-here /var/log/syslog
Jul 12 16:46:33 nsn7 kernel: [27774.476193] andreas-was-here
root@nsn7:~#

But with this new v6 config style:
module(load="imklog" permitnonkernelfacility="on") # provides kernel logging support
#$ModLoad imklog
#$KLogPermitNonKernelFacility on

The text doesn't show up in /var/log/syslog. That's the upstream bug.

Andreas Hasenack (ahasenack) wrote :

I have test packages built with the patch mentioned in the github issue:

https://launchpad.net/~ahasenack/+archive/ubuntu/rsyslog-permitnonkernelfacility-1703987

A quick test shows it works as expected now using the new style config.

Changed in rsyslog (Ubuntu):
status: New → Triaged
importance: Undecided → Low
tags: added: server-next
Andreas Hasenack (ahasenack) wrote :
Changed in rsyslog (Ubuntu):
assignee: nobody → Andreas Hasenack (ahasenack)
status: Triaged → In Progress
Robie Basak (racb) wrote :

Uploaded.

Changed in rsyslog (Ubuntu):
status: In Progress → Fix Committed
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package rsyslog - 8.16.0-1ubuntu6

---------------
rsyslog (8.16.0-1ubuntu6) artful; urgency=medium

  * debian/patches/fix-permitnonkernelfacility-1703987.patch: Fix
    setting of permitnonkernelfacility with new style config.
    (LP: #1703987)

 -- Andreas Hasenack <email address hidden> Wed, 12 Jul 2017 17:30:08 -0300

Changed in rsyslog (Ubuntu):
status: Fix Committed → Fix Released
Mikko Rantalainen (mira) wrote :

Could this be backported to Ubuntu 16.04 LTS? It still only has 8.16.0-1ubuntu3.

Eric G (erickg) wrote :

Still seems to be a problem for 16.04.

Changed in rsyslog:
status: Unknown → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.