Use systemd-journald instead of log files
This patch aims to migrate service from usage of regular syslog files to journald. We also disable uwsgi logging, since it dublicates requests that are logged by service itself. Change-Id: I0f9eeeb5db890ba2119f7e8a5e85b9f6923092d6
This commit is contained in:
parent
b9af252909
commit
4e78f8b6f8
|
@ -181,6 +181,7 @@ sahara_pip_packages:
|
|||
- python-saharaclient
|
||||
- python-keystoneclient
|
||||
- sahara
|
||||
- systemd-python
|
||||
- warlock
|
||||
- uwsgi
|
||||
|
||||
|
|
|
@ -42,27 +42,6 @@
|
|||
- { path: "/var/cache/sahara" }
|
||||
- { path: "{{ sahara_system_user_home }}" }
|
||||
|
||||
- name: Test for log directory or link
|
||||
shell: |
|
||||
if [ -h "/var/log/sahara" ]; then
|
||||
chown -h {{ sahara_system_user_name }}:{{ sahara_system_group_name }} "/var/log/sahara"
|
||||
chown -R {{ sahara_system_user_name }}:{{ sahara_system_group_name }} "$(readlink /var/log/sahara)"
|
||||
else
|
||||
exit 1
|
||||
fi
|
||||
register: log_dir
|
||||
failed_when: false
|
||||
changed_when: log_dir.rc != 0
|
||||
|
||||
- name: Create sahara log dir
|
||||
file:
|
||||
path: "/var/log/sahara"
|
||||
state: directory
|
||||
owner: "{{ sahara_system_user_name }}"
|
||||
group: "{{ sahara_system_group_name }}"
|
||||
mode: "0755"
|
||||
when: log_dir.rc != 0
|
||||
|
||||
- name: Drop sudoers file
|
||||
template:
|
||||
src: "sudoers.j2"
|
||||
|
|
|
@ -16,7 +16,7 @@ lazy-apps = true
|
|||
add-header = Connection: close
|
||||
buffer-size = {{ sahara_wsgi_buffer_size }}
|
||||
thunder-lock = true
|
||||
logfile-chmod = 644
|
||||
disable-logging = true
|
||||
|
||||
# Avoid filling up the logs with health check requests from haproxy.
|
||||
route-user-agent = ^osa-haproxy-healthcheck$ donotlog:
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
use_stderr = False
|
||||
|
||||
debug = {{ debug }}
|
||||
log_file = /var/log/sahara/sahara.log
|
||||
use_journal = True
|
||||
fatal_deprecations = {{ sahara_fatal_deprecations }}
|
||||
host = {{ sahara_api_bind_address }}
|
||||
port = {{ sahara_api_service_port }}
|
||||
|
|
|
@ -18,4 +18,5 @@ cache_timeout: 600
|
|||
# Common apt packages
|
||||
sahara_distro_packages:
|
||||
- git
|
||||
- libsystemd-dev
|
||||
- libxml2-dev
|
||||
|
|
|
@ -13,7 +13,8 @@
|
|||
sahara_distro_packages:
|
||||
- cronie
|
||||
- cronie-anacron
|
||||
- rpcbind
|
||||
- git
|
||||
- which
|
||||
- libxml2-devel
|
||||
- rpcbind
|
||||
- systemd-devel
|
||||
- which
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
sahara_distro_packages:
|
||||
- cronie
|
||||
- cronie-anacron
|
||||
- rpcbind
|
||||
- git-core
|
||||
- rpcbind
|
||||
- systemd-devel
|
||||
- which
|
||||
|
|
Loading…
Reference in New Issue