Change amphora logging to dedicated socket
In some environments running older versions of gunicorn in the amphora image, gunicorn can fail to start do to /dev/log socket issues (timing, configuration, etc.). This patch sets up a dedicated rsyslog socket /run/rsyslog/octavia/log for gunicorn and haproxy to use. This should resolve any issues with systemd overriding the /dev/log socket. This also bumps the gunicorn minimum verison to 19.9.0. Change-Id: I1e1ad8fde2ad8c1ffba95b1867afb130503b0a5b
This commit is contained in:
parent
6053c4baeb
commit
afa917a3de
@ -1,4 +1,5 @@
|
|||||||
dib-init-system
|
dib-init-system
|
||||||
|
install-static
|
||||||
package-installs
|
package-installs
|
||||||
pkg-map
|
pkg-map
|
||||||
source-repositories
|
source-repositories
|
||||||
|
@ -0,0 +1,4 @@
|
|||||||
|
module(load="imuxsock")
|
||||||
|
input(type="imuxsock"
|
||||||
|
Socket="/run/rsyslog/octavia/log"
|
||||||
|
CreatePath="on")
|
@ -43,7 +43,7 @@ futures==3.0.0
|
|||||||
gitdb2==2.0.3
|
gitdb2==2.0.3
|
||||||
GitPython==2.1.8
|
GitPython==2.1.8
|
||||||
greenlet==0.4.13
|
greenlet==0.4.13
|
||||||
gunicorn==19.0.0
|
gunicorn==19.9.0
|
||||||
hacking==0.12.0
|
hacking==0.12.0
|
||||||
idna==2.6
|
idna==2.6
|
||||||
imagesize==1.0.0
|
imagesize==1.0.0
|
||||||
|
@ -83,7 +83,7 @@ def main():
|
|||||||
'syslog': True,
|
'syslog': True,
|
||||||
'syslog_facility': 'local{}'.format(
|
'syslog_facility': 'local{}'.format(
|
||||||
CONF.amphora_agent.administrative_log_facility),
|
CONF.amphora_agent.administrative_log_facility),
|
||||||
'syslog_addr': 'unix://dev/log',
|
'syslog_addr': 'unix://run/rsyslog/octavia/log#dgram',
|
||||||
|
|
||||||
}
|
}
|
||||||
AmphoraAgent(server_instance.app, options).run()
|
AmphoraAgent(server_instance.app, options).run()
|
||||||
|
@ -17,8 +17,8 @@
|
|||||||
global
|
global
|
||||||
daemon
|
daemon
|
||||||
user nobody
|
user nobody
|
||||||
log {{ log_http | default('/dev/log', true)}} local{{ user_log_facility }}
|
log {{ log_http | default('/run/rsyslog/octavia/log', true)}} local{{ user_log_facility }}
|
||||||
log {{ log_server | default('/dev/log', true)}} local{{ administrative_log_facility }} notice
|
log {{ log_server | default('/run/rsyslog/octavia/log', true)}} local{{ administrative_log_facility }} notice
|
||||||
stats socket {{ sock_path }} mode 0666 level user
|
stats socket {{ sock_path }} mode 0666 level user
|
||||||
{% if loadbalancer.global_connection_limit is defined %}
|
{% if loadbalancer.global_connection_limit is defined %}
|
||||||
maxconn {{ loadbalancer.global_connection_limit }}
|
maxconn {{ loadbalancer.global_connection_limit }}
|
||||||
|
@ -17,8 +17,8 @@
|
|||||||
global
|
global
|
||||||
daemon
|
daemon
|
||||||
user nobody
|
user nobody
|
||||||
log {{ log_http | default('/dev/log', true)}} local{{ user_log_facility }}
|
log {{ log_http | default('/run/rsyslog/octavia/log', true)}} local{{ user_log_facility }}
|
||||||
log {{ log_server | default('/dev/log', true)}} local{{ administrative_log_facility }} notice
|
log {{ log_server | default('/run/rsyslog/octavia/log', true)}} local{{ administrative_log_facility }} notice
|
||||||
stats socket {{ sock_path }} mode 0666 level user
|
stats socket {{ sock_path }} mode 0666 level user
|
||||||
{% if loadbalancer.global_connection_limit is defined %}
|
{% if loadbalancer.global_connection_limit is defined %}
|
||||||
maxconn {{ loadbalancer.global_connection_limit }}
|
maxconn {{ loadbalancer.global_connection_limit }}
|
||||||
|
@ -28,8 +28,8 @@ class HAProxyCompatTestCase(base.TestCase):
|
|||||||
"global\n"
|
"global\n"
|
||||||
" daemon\n"
|
" daemon\n"
|
||||||
" user nobody\n"
|
" user nobody\n"
|
||||||
" log /dev/log local0\n"
|
" log /run/rsyslog/octavia/log local0\n"
|
||||||
" log /dev/log local1 notice\n"
|
" log /run/rsyslog/octavia/log local1 notice\n"
|
||||||
" stats socket /var/lib/octavia/sample_loadbalancer_id_1.sock"
|
" stats socket /var/lib/octavia/sample_loadbalancer_id_1.sock"
|
||||||
" mode 0666 level user\n"
|
" mode 0666 level user\n"
|
||||||
" maxconn {maxconn}\n\n"
|
" maxconn {maxconn}\n\n"
|
||||||
|
@ -1085,8 +1085,8 @@ def sample_base_expected_config(frontend=None, backend=None,
|
|||||||
"global\n"
|
"global\n"
|
||||||
" daemon\n"
|
" daemon\n"
|
||||||
" user nobody\n"
|
" user nobody\n"
|
||||||
" log /dev/log local0\n"
|
" log /run/rsyslog/octavia/log local0\n"
|
||||||
" log /dev/log local1 notice\n"
|
" log /run/rsyslog/octavia/log local1 notice\n"
|
||||||
" stats socket /var/lib/octavia/sample_loadbalancer_id_1.sock"
|
" stats socket /var/lib/octavia/sample_loadbalancer_id_1.sock"
|
||||||
" mode 0666 level user\n" +
|
" mode 0666 level user\n" +
|
||||||
global_opts + defaults + peers + frontend + backend)
|
global_opts + defaults + peers + frontend + backend)
|
||||||
|
@ -1103,8 +1103,8 @@ def sample_base_expected_config(frontend=None, backend=None,
|
|||||||
"global\n"
|
"global\n"
|
||||||
" daemon\n"
|
" daemon\n"
|
||||||
" user nobody\n"
|
" user nobody\n"
|
||||||
" log /dev/log local0\n"
|
" log /run/rsyslog/octavia/log local0\n"
|
||||||
" log /dev/log local1 notice\n"
|
" log /run/rsyslog/octavia/log local1 notice\n"
|
||||||
" stats socket /var/lib/octavia/sample_listener_id_1.sock"
|
" stats socket /var/lib/octavia/sample_listener_id_1.sock"
|
||||||
" mode 0666 level user\n" +
|
" mode 0666 level user\n" +
|
||||||
global_opts + defaults + peers + frontend + backend)
|
global_opts + defaults + peers + frontend + backend)
|
||||||
|
@ -55,5 +55,5 @@ netifaces>=0.10.4 # MIT
|
|||||||
ipaddress>=1.0.17;python_version<'3.3' # PSF
|
ipaddress>=1.0.17;python_version<'3.3' # PSF
|
||||||
cryptography>=2.1 # BSD/Apache-2.0
|
cryptography>=2.1 # BSD/Apache-2.0
|
||||||
pyroute2>=0.4.21;sys_platform!='win32' # Apache-2.0 (+ dual licensed GPL2)
|
pyroute2>=0.4.21;sys_platform!='win32' # Apache-2.0 (+ dual licensed GPL2)
|
||||||
gunicorn>=19.0.0 # MIT
|
gunicorn>=19.9.0 # MIT
|
||||||
Werkzeug>=0.14.1 # BSD License
|
Werkzeug>=0.14.1 # BSD License
|
||||||
|
Loading…
Reference in New Issue
Block a user