haproxy logging on openstack charms misconfigured

Bug #1477411 reported by Brad Marshall
18
This bug affects 3 people
Affects Status Importance Assigned to Milestone
OpenStack Nova Cloud Controller Charm
Triaged
Medium
Unassigned
nova-cloud-controller (Juju Charms Collection)
Invalid
Medium
Unassigned

Bug Description

The haproxy configuration for the OpenStack charms tries to log via UDP to a local syslog server. By default, Ubuntu doesn't listen on UDP for syslog entries. To make it listen, I tweaked /etc/rsyslog.conf by uncommenting:

  $ModLoad imudp
  $UDPServerRun 514

After a rsyslog restart, we now got logs - but into both /var/log/syslog and /var/log/haproxy.log. The next step was to move /etc/rsyslog.d/haproxy.conf to /etc/rsyslog.d/49-rsyslogd.conf, to get it to happen before the default catchall 50-default.conf.

I tested this on trusty with nova-cloud-controller from lp:charms/trusty/nova-cloud-controller, revno=163 - none of the revisions above that had anything to do with logging though. It appears to be the same for all the other openstack charms though.

Please let me know if you need any further information, or any further debugging done.

tags: added: canonical-bootstack
Revision history for this message
James Page (james-page) wrote :

I think the intent of the syslog support is that its deployed with something like the rsyslog-* charms

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

James, that may be the intent, but the charm as delivered just doesn't log anything from haproxy at all, since the default config will try to talk to localhost syslog via udp. I also don't see anything in the READMEs about using the rsyslog charms with it, nor in the release notes.

It could also be argued that the config is misleading in that there is a use-syslog setting but that is default false, because that applies to the underlying daemons, not to the haproxy sitting in front of it.

I've filed LP#1524635 about the haproxy package default config causing the double logging.

Revision history for this message
James Page (james-page) wrote :

As we're in full control of the log configuration:

global
    log {{ local_host }} local0
    log {{ local_host }} local1 notice

so we should probably just switch {{ local_host }} -> /dev/log for all charms; this is templated via charm-helpers:

global
    log /dev/log local0
    log /dev/log local1 notice

Changed in nova-cloud-controller (Juju Charms Collection):
status: New → Triaged
importance: Undecided → Medium
James Page (james-page)
Changed in charm-nova-cloud-controller:
importance: Undecided → Medium
status: New → Triaged
Changed in nova-cloud-controller (Juju Charms Collection):
status: Triaged → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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