rsyslog still includes /etc/default/rsyslog, which isn't used

Bug #570103 reported by Mark Schouten
46
This bug affects 4 people
Affects Status Importance Assigned to Milestone
rsyslog (Ubuntu)
Fix Released
Undecided
Unassigned
Lucid
Fix Released
Undecided
Unassigned

Bug Description

Binary package hint: rsyslog

The package for rsyslog in Lucid still includes a /etc/default/rsyslog file. Since the migration to upstart, that file should be there, afaik. It's rather confusing for users to have that file, restart syslog and see that the changes aren't honored.

Please remove /etc/default/rsyslog from the package, thanks!

Revision history for this message
Nico de Wet (nico-nicodewet) wrote :

I agree, just wasted quite a bit of time editing /etc/default/rsyslog, restarting only to find that the changes had no effect. If the file cannot be deleted then a warning should be placed in there for the Upstart ignoramuses out there (such as myself up until a few minutes ago).

On the upside however I've now gotten stuck into http://upstart.ubuntu.com/getting-started.html

Chris Jones (cmsj)
Changed in rsyslog (Ubuntu):
status: New → Confirmed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package rsyslog - 4.6.4-2ubuntu2

---------------
rsyslog (4.6.4-2ubuntu2) natty; urgency=low

  * Remove debian/rsyslog.default as the upstart init script doesn't read
    /etc/default/rsyslog (LP: #570103)
 -- Stephane Graber <email address hidden> Mon, 06 Dec 2010 14:47:32 -0500

Changed in rsyslog (Ubuntu):
status: Confirmed → Fix Released
Revision history for this message
Stéphane Graber (stgraber) wrote :

Apparently Launchpad didn't notice the second upload.
Instead of removing /etc/default/rsyslog the init script has now been updated to use /etc/default/rsyslog.

This one should probably be backported to at least Lucid.

--------------------

rsyslog (4.6.4-2ubuntu3) natty; urgency=low

  * Instead of removing /etc/default/rsyslog, patch the upstart job to
    parse it as the old init script used to (LP: #570103)

Date: Mon, 06 Dec 2010 14:56:18 -0500
Changed-By: Stéphane Graber <stgraber at ubuntu.com>
Maintainer: Ubuntu Developers <ubuntu-devel-discuss at lists.ubuntu.com>
Signed-By: Stéphane Graber <stgraber at stgraber.org>

Revision history for this message
Michael Jeanson (mjeanson) wrote :

SRU for lucid (https://wiki.ubuntu.com/StableReleaseUpdates)

1. Impact :
Changes in /etc/default/rsyslog aren't honored by the upstart job.

2. Fix in development version :
The fix is a simple modification in the upstart job to source the default file.
It was fixed in natty with package version 4.6.4-2ubuntu3

3. Patch :
See bzr branch : lp:~mjeanson/ubuntu/lucid/rsyslog/bug570103

TEST CASE:
* Add options to RSYSLOGD_OPTIONS in /etc/default/rsyslog
* Restart rsyslog and verify that the options were not applied

5. Regression potential
If a user has invalid informations in /etc/default/rsyslog, it was previously ignored and will now be sourced.

Changed in rsyslog (Ubuntu Lucid):
status: New → Triaged
Revision history for this message
Stéphane Graber (stgraber) wrote :

Uploaded to lucid-proposed currently waiting for approval.

Revision history for this message
Martin Pitt (pitti) wrote : Please test proposed package

Accepted rsyslog into lucid-proposed, the package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

Changed in rsyslog (Ubuntu Lucid):
status: Triaged → Fix Committed
tags: added: verification-needed
Revision history for this message
Marc Gariépy (mgariepy) wrote :

It works for me, now the /etc/default/rsyslog is used to run the deamon.

Thanks:)

Revision history for this message
Simon Déziel (sdeziel) wrote :

I just confirmed that it worked for me too.

Thanks

Revision history for this message
Alexandre Letourneau (letourneau-alexandre) wrote :

It works fantastically well, and solve all my rsyslog issues, thank you so much for the awesome work !

Martin Pitt (pitti)
tags: added: verification-done
removed: verification-needed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package rsyslog - 4.2.0-2ubuntu8.1

---------------
rsyslog (4.2.0-2ubuntu8.1) lucid-proposed; urgency=low

  * debian/rsyslog.upstart:
    - Patch the upstart job to source /etc/default/rsyslog as the old init
      script used to. (LP: #570103)
 -- Michael Jeanson <email address hidden> Wed, 08 Dec 2010 13:46:31 -0500

Changed in rsyslog (Ubuntu Lucid):
status: Fix Committed → Fix Released
Revision history for this message
sm8ps (sm8ps) wrote :

Somehow this does not work for me on Lucid LTS. I do have rsyslog (4.2.0-2ubuntu8.1) installed. (In the Synaptics sources configuration editor I do have lucid proposed checked.) The upstart script '/etc/init/rsyslog.conf' runs 'exec rsyslogd -c4' as last line nevertheless without checking '/etc/default/rsyslog'. I tried re-installing rsyslog (4.2.0-2ubuntu8.1) to no avail. What else must I do to get this fix working?
Cheers!

Revision history for this message
Simon Déziel (sdeziel) wrote :

@sm8ps

Here is the /etc/init/rsyslog.conf as shipped in rsyslog 4.2.0-2ubuntu8.1 :

# rsyslog - system logging daemon
#
# rsyslog is an enhanced multi-threaded replacement for the traditional
# syslog daemon, logging messages from applications

description "system logging daemon"

start on filesystem
stop on runlevel [06]

expect fork
respawn

script
    . /etc/default/rsyslog
    exec rsyslogd $RSYSLOGD_OPTIONS
end script

Revision history for this message
Clint Byrum (clint-fewbar) wrote : Re: [Bug 570103] Re: rsyslog still includes /etc/default/rsyslog, which isn't used

Excerpts from sm8ps's message of Thu Jun 09 16:40:43 UTC 2011:
> Somehow this does not work for me on Lucid LTS. I do have rsyslog (4.2.0-2ubuntu8.1) installed. (In the Synaptics sources configuration editor I do have lucid proposed checked.) The upstart script '/etc/init/rsyslog.conf' runs 'exec rsyslogd -c4' as last line nevertheless without checking '/etc/default/rsyslog'. I tried re-installing rsyslog (4.2.0-2ubuntu8.1) to no avail. What else must I do to get this fix working?
> Cheers!
>

Hi sm8ps.

Are you certain that you have the updated /etc/init/rsyslog.conf ? Since it is a conffile,
dpkg may have kept a modified version and not installed the new one.

It should include the changes shown here:

http://bazaar.launchpad.net/~ubuntu-branches/ubuntu/lucid/rsyslog/lucid-proposed/revision/28

Note the 'script' section added to debian/rsyslog.upstart

Revision history for this message
Clint Byrum (clint-fewbar) wrote :

Excerpts from Simon Déziel's message of Thu Jun 09 16:57:33 UTC 2011:
> @sm8ps
>
> Here is the /etc/init/rsyslog.conf as shipped in rsyslog
> 4.2.0-2ubuntu8.1 :
>
> # rsyslog - system logging daemon
> #
> # rsyslog is an enhanced multi-threaded replacement for the traditional
> # syslog daemon, logging messages from applications
>
> description "system logging daemon"
>
> start on filesystem
> stop on runlevel [06]
>
> expect fork
> respawn
>
> script
> . /etc/default/rsyslog
> exec rsyslogd $RSYSLOGD_OPTIONS
> end script

Can you also paste your /etc/default/rsyslog ?

Thanks!

Revision history for this message
sm8ps (sm8ps) wrote :

Thanks for your answers, Simon and Clint! Obviously, '/etc/init/rsyslog.conf' has not been updated as it is missing the 'script'-section. I had a fresh install of Lucid and turned on backports after installation which was several weeks ago. From the 'dpkg'-log I see that 'syslogd' was upgraded to version 4.2.0-2ubuntu8.1. I had not modified anything in either configuration or upstart file until today when I had to turn remote logging on.
So it seems that the upgrade did not change '/etc/init/rsyslog.conf' as it should have from my point of view. The fix is easy, of course. I shall simply add the 'script'-section. Maybe this information can provide useful to somebody else in the same situation. However, I think that 'dpkg' should handle the upgrade in a different way.
Cheers!
St. Mueller, Switzerland

Revision history for this message
sm8ps (sm8ps) wrote :

Oh no, I just had my that "Oh no!"-moment of today! Please ignore all my above postings because I had got mixed up between my local machine and the remote server. So I considered the wrong machine. I am terribly sorry for that! (Damn virtual server zoo!)
Thanks for your consideration nevertheless!
St. Müller, Switzerland

Revision history for this message
Simon Déziel (sdeziel) wrote :

@Clint

/etc/default/rsyslog :
# Options for rsyslogd
# -m 0 disables 'MARK' messages (deprecated, only used in compat mode < 3)
# -r enables logging from remote machines (deprecated, only used in compat mode < 3)
# -x disables DNS lookups on messages received with -r
# -c compatibility mode
# See rsyslogd(8) for more details
RSYSLOGD_OPTIONS="-c2 -r"

# ps aux| grep rsyslogd
syslog 3297 0.0 0.0 138180 1484 ? Sl 17:27 0:00 rsyslogd -c2 -r

But I can't see the socket.

Revision history for this message
Simon Déziel (sdeziel) wrote :

So the default file is effectively sourced but rsyslogd does not listen on UDP 514 even when RSYSLOGD_OPTIONS="-c2 -r".

To bind it to that port I had to uncomment the following in /etc/rsyslogd.conf :

$ModLoad imudp
$UDPServerRun 514

And I left the default option RSYSLOGD_OPTIONS="-c4".

Revision history for this message
Simon Déziel (sdeziel) wrote :

man 8 rsyslogd does not reference "-r" so that might explain it. When using other options like RSYSLOGD_OPTIONS="-c4 -4" to bind on IPv4 only all works as documented.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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