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: If1eda4d803661a0b924941aecd1867302391a5f4
This commit is contained in:
Dmitriy Rabotyagov 2019-07-15 19:47:54 +03:00
parent 35e35da176
commit 7d904743ef
7 changed files with 10 additions and 32 deletions

View File

@ -72,7 +72,6 @@ nova_system_shell: /bin/bash
nova_system_comment: nova system user
nova_system_home_folder: "/var/lib/{{ nova_system_user_name }}"
nova_libvirt_save_path: "{{ nova_system_home_folder }}/save"
nova_log_dir: "/var/log/nova"
nova_lock_path: "/var/lock/nova"
@ -529,6 +528,7 @@ nova_pip_packages:
- python-memcached
- python-novaclient
- python-openstackclient
- systemd-python
- uWSGI
# Specific pip packages provided by the user

View File

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

View File

@ -22,7 +22,7 @@ lazy-apps = true
add-header = Connection: close
buffer-size = {{ nova_wsgi_buffer_size }}
thunder-lock = true
logfile-chmod = 644
disable-logging = true
pidfile = /var/run/{{ item.service_name }}/{{ item.service_name }}.pid
# Avoid filling up the logs with health check requests from haproxy.

View File

@ -6,7 +6,7 @@ use_stderr = False
# Logs / State
debug = {{ debug }}
fatal_deprecations = {{ nova_fatal_deprecations }}
log_dir = {{ nova_log_dir }}
use_journal = True
state_path = {{ nova_system_home_folder }}
rootwrap_config = /etc/nova/rootwrap.conf
service_down_time = 120

View File

@ -24,17 +24,19 @@ nova_distro_packages:
- genisoimage
- git
- iptables
- python-openstackclient
- libpython2.7
- python-openstackclient
nova_devel_distro_packages:
- libpq-dev
- libsystemd-dev
- libxml2-dev
- python-httplib2
nova_service_distro_packages:
- python3-nova
- python3-memcache
- python3-systemd
nova_service_extra_distro_packages:
kvm:

View File

@ -28,6 +28,7 @@ nova_distro_packages:
nova_devel_distro_packages:
- libxml2-devel
- postgresql-devel
- systemd-devel
- which
nova_service_distro_packages:
@ -38,6 +39,7 @@ nova_service_distro_packages:
- python-memcached
- python-novaclient
- python2-PyMySQL
- systemd-python
nova_service_extra_distro_packages:
kvm:

View File

@ -30,6 +30,7 @@ nova_devel_distro_packages:
- libxml2-devel
- postgresql-devel
- python-httplib2
- systemd-devel
nova_service_distro_packages:
- openstack-nova-api
@ -38,6 +39,7 @@ nova_service_distro_packages:
- python-memcached
- python-novaclient
- python-PyMySQL
- python-systemd
nova_service_extra_distro_packages:
kvm: