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: Id466ac20d9d18fa86a4615a73433a51720bafc8e
This commit is contained in:
Dmitriy Rabotyagov 2019-07-17 20:32:27 +03:00
parent 4329f2f3e5
commit 0839ec0935
6 changed files with 5 additions and 29 deletions

View File

@ -242,6 +242,7 @@ zun_pip_packages:
- python-memcached
- python-zunclient
- pymysql
- systemd-python
- zun
## (Qdrouterd) integration

View File

@ -74,34 +74,6 @@
tags:
- zun-dirs
- name: Test for log directory or link
shell: |
if [ -h "{{ zun_log_dir }}" ]; then
chown -h {{ zun_system_user_name }}:{{ zun_system_group_name }} "{{ zun_log_dir }}"
chown -R {{ zun_system_user_name }}:{{ zun_system_group_name }} "$(readlink {{ zun_log_dir }})"
else
exit 1
fi
register: log_dir
failed_when: false
changed_when: false
tags:
- zun-dirs
- zun-logs
- name: Create zun log dir
file:
path: "{{ zun_log_dir }}"
state: directory
owner: "{{ zun_system_user_name }}"
group: "{{ zun_system_group_name }}"
mode: "0755"
when:
- log_dir.rc != 0
tags:
- zun-dirs
- zun-logs
- name: Drop sudoers file
template:
src: "sudoers.j2"

View File

@ -51,7 +51,7 @@
# to enable journal support. Doing so will use the journal native protocol
# which includes structured metadata in addition to log messages.This option is
# ignored if log_config_append is set. (boolean value)
#use_journal = false
use_journal = true
# Syslog facility to receive log lines. This option is ignored if
# log_config_append is set. (string value)

View File

@ -23,6 +23,7 @@ zun_distro_packages:
- ca-certificates
- curl
- git
- libsystemd-dev
- software-properties-common
zun_distro_compute_packages:

View File

@ -20,6 +20,7 @@ zun_docker_repo:
# Common yum packages
zun_distro_packages:
- git
- systemd-devel
zun_distro_compute_packages:
- docker

View File

@ -23,6 +23,7 @@ zun_distro_packages:
- git
- yum-utils
- lvm2
- systemd-devel
zun_distro_compute_packages:
- docker-ce