Merge "Change amphora logging to dedicated socket"

This commit is contained in:
Zuul 2019-08-22 19:44:54 +00:00 committed by Gerrit Code Review
commit 0ee7a3cf22
10 changed files with 18 additions and 13 deletions

View File

@ -1,4 +1,5 @@
dib-init-system
install-static
package-installs
pkg-map
source-repositories

View File

@ -0,0 +1,4 @@
module(load="imuxsock")
input(type="imuxsock"
Socket="/run/rsyslog/octavia/log"
CreatePath="on")

View File

@ -43,7 +43,7 @@ futures==3.0.0
gitdb2==2.0.3
GitPython==2.1.8
greenlet==0.4.13
gunicorn==19.0.0
gunicorn==19.9.0
hacking==0.12.0
idna==2.6
imagesize==1.0.0

View File

@ -83,7 +83,7 @@ def main():
'syslog': True,
'syslog_facility': 'local{}'.format(
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()

View File

@ -17,8 +17,8 @@
global
daemon
user nobody
log {{ log_http | default('/dev/log', true)}} local{{ user_log_facility }}
log {{ log_server | default('/dev/log', true)}} local{{ administrative_log_facility }} notice
log {{ log_http | default('/run/rsyslog/octavia/log', true)}} local{{ user_log_facility }}
log {{ log_server | default('/run/rsyslog/octavia/log', true)}} local{{ administrative_log_facility }} notice
stats socket {{ sock_path }} mode 0666 level user
{% if loadbalancer.global_connection_limit is defined %}
maxconn {{ loadbalancer.global_connection_limit }}

View File

@ -17,8 +17,8 @@
global
daemon
user nobody
log {{ log_http | default('/dev/log', true)}} local{{ user_log_facility }}
log {{ log_server | default('/dev/log', true)}} local{{ administrative_log_facility }} notice
log {{ log_http | default('/run/rsyslog/octavia/log', true)}} local{{ user_log_facility }}
log {{ log_server | default('/run/rsyslog/octavia/log', true)}} local{{ administrative_log_facility }} notice
stats socket {{ sock_path }} mode 0666 level user
{% if loadbalancer.global_connection_limit is defined %}
maxconn {{ loadbalancer.global_connection_limit }}

View File

@ -28,8 +28,8 @@ class HAProxyCompatTestCase(base.TestCase):
"global\n"
" daemon\n"
" user nobody\n"
" log /dev/log local0\n"
" log /dev/log local1 notice\n"
" log /run/rsyslog/octavia/log local0\n"
" log /run/rsyslog/octavia/log local1 notice\n"
" stats socket /var/lib/octavia/sample_loadbalancer_id_1.sock"
" mode 0666 level user\n"
" maxconn {maxconn}\n\n"

View File

@ -1085,8 +1085,8 @@ def sample_base_expected_config(frontend=None, backend=None,
"global\n"
" daemon\n"
" user nobody\n"
" log /dev/log local0\n"
" log /dev/log local1 notice\n"
" log /run/rsyslog/octavia/log local0\n"
" log /run/rsyslog/octavia/log local1 notice\n"
" stats socket /var/lib/octavia/sample_loadbalancer_id_1.sock"
" mode 0666 level user\n" +
global_opts + defaults + peers + frontend + backend)

View File

@ -1103,8 +1103,8 @@ def sample_base_expected_config(frontend=None, backend=None,
"global\n"
" daemon\n"
" user nobody\n"
" log /dev/log local0\n"
" log /dev/log local1 notice\n"
" log /run/rsyslog/octavia/log local0\n"
" log /run/rsyslog/octavia/log local1 notice\n"
" stats socket /var/lib/octavia/sample_listener_id_1.sock"
" mode 0666 level user\n" +
global_opts + defaults + peers + frontend + backend)

View File

@ -55,5 +55,5 @@ netifaces>=0.10.4 # MIT
ipaddress>=1.0.17;python_version<'3.3' # PSF
cryptography>=2.1 # BSD/Apache-2.0
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