Align haproxy logging config with charm-helpers

The previous config didn't actually log anything, and it has been fixed
for classic OpenStack API charms through charm-helpers. We need to
update layer-openstack as well to reflect those changes to reactive
OpenStack API charms.

Closes-Bug: #1697002
Related-Bug: #1940037
Change-Id: I523369673471f63346428f7f739a2429aa5084b3
This commit is contained in:
Nobuto Murata 2021-10-12 22:30:30 +09:00
parent 1ff51a9bf3
commit 5999eeaa5d
1 changed files with 16 additions and 2 deletions

View File

@ -1,10 +1,24 @@
global
log {{ options.local_host }} local0
log {{ options.local_host }} local1 notice
# NOTE: on startup haproxy chroot's to /var/lib/haproxy.
#
# Unfortunately the program will open some files prior to the call to
# chroot never to reopen them, and some after. So looking at the on-disk
# layout of haproxy resources you will find some resources relative to /
# such as the admin socket, and some relative to /var/lib/haproxy such as
# the log socket.
#
# The logging socket is (re-)opened after the chroot and must be relative
# to /var/lib/haproxy.
log /dev/log local0
log /dev/log local1 notice
maxconn 20000
user haproxy
group haproxy
spread-checks 0
# The admin socket is opened prior to the chroot never to be reopened, so
# it lives outside the chroot directory in the filesystem.
stats socket /var/run/haproxy/admin.sock mode 600 level admin
stats timeout 2m
defaults
log global