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:
parent
4329f2f3e5
commit
0839ec0935
@ -242,6 +242,7 @@ zun_pip_packages:
|
|||||||
- python-memcached
|
- python-memcached
|
||||||
- python-zunclient
|
- python-zunclient
|
||||||
- pymysql
|
- pymysql
|
||||||
|
- systemd-python
|
||||||
- zun
|
- zun
|
||||||
|
|
||||||
## (Qdrouterd) integration
|
## (Qdrouterd) integration
|
||||||
|
@ -74,34 +74,6 @@
|
|||||||
tags:
|
tags:
|
||||||
- zun-dirs
|
- 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
|
- name: Drop sudoers file
|
||||||
template:
|
template:
|
||||||
src: "sudoers.j2"
|
src: "sudoers.j2"
|
||||||
|
@ -51,7 +51,7 @@
|
|||||||
# to enable journal support. Doing so will use the journal native protocol
|
# to enable journal support. Doing so will use the journal native protocol
|
||||||
# which includes structured metadata in addition to log messages.This option is
|
# which includes structured metadata in addition to log messages.This option is
|
||||||
# ignored if log_config_append is set. (boolean value)
|
# 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
|
# Syslog facility to receive log lines. This option is ignored if
|
||||||
# log_config_append is set. (string value)
|
# log_config_append is set. (string value)
|
||||||
|
@ -23,6 +23,7 @@ zun_distro_packages:
|
|||||||
- ca-certificates
|
- ca-certificates
|
||||||
- curl
|
- curl
|
||||||
- git
|
- git
|
||||||
|
- libsystemd-dev
|
||||||
- software-properties-common
|
- software-properties-common
|
||||||
|
|
||||||
zun_distro_compute_packages:
|
zun_distro_compute_packages:
|
||||||
|
@ -20,6 +20,7 @@ zun_docker_repo:
|
|||||||
# Common yum packages
|
# Common yum packages
|
||||||
zun_distro_packages:
|
zun_distro_packages:
|
||||||
- git
|
- git
|
||||||
|
- systemd-devel
|
||||||
|
|
||||||
zun_distro_compute_packages:
|
zun_distro_compute_packages:
|
||||||
- docker
|
- docker
|
||||||
|
@ -23,6 +23,7 @@ zun_distro_packages:
|
|||||||
- git
|
- git
|
||||||
- yum-utils
|
- yum-utils
|
||||||
- lvm2
|
- lvm2
|
||||||
|
- systemd-devel
|
||||||
|
|
||||||
zun_distro_compute_packages:
|
zun_distro_compute_packages:
|
||||||
- docker-ce
|
- docker-ce
|
||||||
|
Loading…
Reference in New Issue
Block a user