Neutron haproxy logs are not being collected
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
devstack |
Invalid
|
Undecided
|
Unassigned | ||
neutron |
Fix Released
|
High
|
Brian Haley | ||
tripleo |
Invalid
|
Wishlist
|
Unassigned |
Bug Description
In Neutron, we use haproxy to proxy metadata requests from instances to Nova Metadata service.
By default, haproxy logs to /dev/log but in Ubuntu, those requests get redirected by rsyslog to
/var/log/
ubuntu@devstack:~$ cat /etc/rsyslog.
# Create an additional socket in haproxy's chroot in order to allow logging via
# /dev/log to chroot'ed HAProxy processes
$AddUnixListenS
# Send HAProxy messages to a dedicated logfile
if $programname startswith 'haproxy' then /var/log/
&~
Another possibility would be to change the haproxy.cfg file to include the log-tag option so that haproxy uses a different tag [0] and then it'd be dumped into syslog instead but this would break backwards compatibility.
[0] https:/
tags: | added: l3-ipam-dhcp |
Changed in tripleo: | |
status: | New → Triaged |
importance: | Undecided → High |
milestone: | none → queens-3 |
Changed in tripleo: | |
milestone: | queens-3 → queens-rc1 |
Changed in neutron: | |
status: | In Progress → Fix Committed |
Changed in tripleo: | |
milestone: | queens-rc1 → rocky-1 |
Changed in neutron: | |
status: | Fix Committed → Fix Released |
Changed in tripleo: | |
milestone: | rocky-1 → rocky-2 |
Changed in tripleo: | |
milestone: | rocky-2 → rocky-3 |
Changed in tripleo: | |
milestone: | rocky-3 → rocky-rc1 |
Changed in tripleo: | |
milestone: | rocky-rc1 → stein-1 |
Changed in tripleo: | |
milestone: | stein-1 → stein-2 |
Changed in tripleo: | |
milestone: | stein-2 → stein-3 |
Changed in tripleo: | |
milestone: | stein-3 → stein-rc1 |
Changed in tripleo: | |
milestone: | stein-rc1 → train-1 |
Changed in tripleo: | |
milestone: | train-1 → train-2 |
Changed in tripleo: | |
milestone: | train-2 → train-3 |
Changed in tripleo: | |
milestone: | train-3 → ussuri-1 |
Changed in tripleo: | |
milestone: | ussuri-1 → ussuri-2 |
Changed in tripleo: | |
milestone: | ussuri-2 → ussuri-3 |
Changed in tripleo: | |
status: | Triaged → Incomplete |
Changed in tripleo: | |
milestone: | ussuri-3 → ussuri-rc3 |
Changed in tripleo: | |
milestone: | ussuri-rc3 → victoria-1 |
Changed in tripleo: | |
milestone: | victoria-1 → victoria-3 |
Changed in tripleo: | |
status: | Incomplete → Invalid |
importance: | High → Wishlist |
So I tested using log-tag in the haproxy conf file, and it does help differentiating things in /var/log/ haproxy. log since all the haproxies will log there.
A typical line went from this:
Jan 15 16:57:45 localhost haproxy[14095]: 10.0.0.6:34898 [15/Jan/ 2018:16: 57:45.650] listener listener/metadata 2/0/1/17/20 200 157 - - ---- 1/1/0/1/0 0/0 "GET /2009-04- 04/meta- data/hostname HTTP/1.1"
to this:
Jan 19 14:49:34 localhost haproxy- metadata- proxy-c891c6a2- 07b3-4cdf- 86c7-6164cdac7d d1[7418] : 10.0.0.7:52947 [19/Jan/ 2018:14: 49:34.097] listener listener/metadata 7/0/0/368/375 200 157 - - ---- 1/1/0/0/0 0/0 "GET /2009-04- 04/meta- data/hostname HTTP/1.1"
Which doesn't look too backwards incompatible, just a change in what proxy logged it.