haproxy syslog configuration causes double logging

Bug #1524635 reported by Brad Marshall
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
haproxy (Ubuntu)
Fix Released
Medium
Unassigned
Trusty
Won't Fix
Medium
Unassigned

Bug Description

The current rsyslogd configuration as provided by the rsyslogd package causes double logging to occur.

Steps to Reproduce:
1) Install haproxy via whatever normal means (apt-get etc)
2) Configure it to listen on at least one port, even just the stats port
3) Visit the URL configured

You'll see logs generated in both /var/log/syslog (via /etc/rsyslogd.d/50-default.conf) and /var/log/haproxy.log (via /etc/rsyslog.d/haproxy.conf).

Steps to fix:
1) mv /etc/rsyslog.d/haproxy.conf 49-haproxy.conf # This could be any number less than 50, to have it read before the default.conf
2) Restart rsyslog.
3) Access the provided service

This will cause the entries to be written out to only /var/log/haproxy.log.

The testing was done on a Ubuntu 14.04 server (trusty) with haproxy 1.4.24-2ubuntu0.3 installed:

$ lsb_release -rd
Description: Ubuntu 14.04.3 LTS
Release: 14.04

$ dpkg-query -W haproxy
haproxy 1.4.24-2ubuntu0.3

Please let me know if you have any further questions.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in haproxy (Ubuntu):
status: New → Confirmed
Robie Basak (racb)
Changed in haproxy (Ubuntu):
importance: Undecided → Medium
tags: added: bitesize
Robie Basak (racb)
Changed in haproxy (Ubuntu):
assignee: nobody → Nish Aravamudan (nacc)
Nish Aravamudan (nacc)
Changed in haproxy (Ubuntu):
status: Confirmed → Fix Released
Revision history for this message
Nish Aravamudan (nacc) wrote :

Note this was fixed in Debian version 1.5.4-1, which is available in 15.10 and 16.04. So the SRU will be to backport the maintscript change that was done there. I will attach a debdiff for exactly that.

@Brad, would you be able to test the package at https://launchpad.net/~nacc/+archive/ubuntu/lp1524635 once it has finished building?

@Robie, I noticed the PPA is saying that there is a newer version because '1.5.14-1ubuntu0.15.10.1~ubuntu14.04.1' is present in trusty-backports. Just to be sure, the backports version is irrelevant to this SRU and I should be applying the change to the trusty-updates version (as the debdiff does)?

Revision history for this message
Brad Marshall (brad-marshall) wrote :

I've just tried upgrading a system to the haproxy from your PPA, and it now only logs to /var/log/syslog. The rsyslog.d file has disappeared completely, and its no longer logging to /var/log/haproxy.log. Is that the intended outcome from this? Or should it be logging to just /var/log/haproxy.log?

I also tried installing the new haproxy by hand, and it still had /etc/rsyslog.d/haproxy.conf file, and was only logging to /var/log/syslog.

Please let me know if you need any more information.

Revision history for this message
Nish Aravamudan (nacc) wrote :

@Brad,

Thank you for you very prompt testing! The intended result of the testing was to see haproxy.conf get mv'd as you suggested, to 49-haproxy.conf. Let me work on setting up a testing environment and see what I did wrong!

-Nish

Revision history for this message
Nish Aravamudan (nacc) wrote :

@Brad,

And to clarify, what did you mean by installing the 'new' haproxy by hand?

Robie Basak (racb)
Changed in haproxy (Ubuntu Trusty):
status: New → Triaged
importance: Undecided → Medium
assignee: nobody → Nish Aravamudan (nacc)
Revision history for this message
Nish Aravamudan (nacc) wrote :

@Brad,

My apologies, please test the new version at the same PPA: 1.4.24-2ubuntu0.5+fix2. Just a complete thinko on my part not to backport the actual moving of the configuration file in debian/rules.

I'll update the debdiff here as well.

Revision history for this message
Nish Aravamudan (nacc) wrote :
Nish Aravamudan (nacc)
Changed in haproxy (Ubuntu Trusty):
status: Triaged → In Progress
Revision history for this message
Nish Aravamudan (nacc) wrote :

@Brad, or anyone else affected by this bug.

Please do test the updated version (1.4.24-2ubuntu0.5+fix2) in the PPA and report back. I'll work on the SRU once successful testing has been reported.

Changed in haproxy (Ubuntu):
assignee: Nish Aravamudan (nacc) → nobody
Changed in haproxy (Ubuntu Trusty):
status: In Progress → Triaged
assignee: Nish Aravamudan (nacc) → nobody
Revision history for this message
Lucas Kanashiro (lucaskanashiro) wrote :

The package in the PPA was not tested by any affected people for 5 years, moreover, Trusty now reached the end of the standard support. Due to that I am unsubscribing ubuntu-server from this bug.

Utkarsh Gupta (utkarsh)
Changed in haproxy (Ubuntu Trusty):
status: Triaged → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

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