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: Iaddb2c158a52d90025899d9bfa5576358bef92dd
This commit is contained in:
Dmitriy Rabotyagov 2019-07-16 16:28:56 +03:00
parent 1388c2abd0
commit 64fdc9d685
8 changed files with 9 additions and 26 deletions

View File

@ -51,7 +51,6 @@ ironic_system_group_name: ironic
ironic_system_shell: /bin/bash ironic_system_shell: /bin/bash
ironic_system_comment: ironic system user ironic_system_comment: ironic system user
ironic_system_home_folder: "/var/lib/{{ ironic_system_user_name }}" ironic_system_home_folder: "/var/lib/{{ ironic_system_user_name }}"
ironic_system_log_folder: "/var/log/{{ ironic_system_user_name }}"
ironic_lock_path: /var/lock/ironic ironic_lock_path: /var/lock/ironic
# Ironic Program and Service names # Ironic Program and Service names
@ -193,6 +192,7 @@ ironic_pip_packages:
- python-swiftclient - python-swiftclient
- python-xclarityclient - python-xclarityclient
- sushy - sushy
- systemd-python
- UcsSdk - UcsSdk
- uwsgi - uwsgi

View File

@ -62,26 +62,3 @@
- { path: "/var/run/ironic" } - { path: "/var/run/ironic" }
- { path: "/var/www/cgi-bin", owner: root, group: root } - { path: "/var/www/cgi-bin", owner: root, group: root }
- { path: "/var/www/cgi-bin/ironic" } - { path: "/var/www/cgi-bin/ironic" }
- name: Test for log directory or link
shell: |
if [ -h "{{ ironic_system_log_folder }}" ]; then
chown -h {{ ironic_system_user_name }}:{{ ironic_system_group_name }} "{{ ironic_system_log_folder }}"
chown -R {{ ironic_system_user_name }}:{{ ironic_system_group_name }} "$(readlink {{ ironic_system_log_folder }} )"
else
exit 1
fi
register: log_dir
failed_when: false
changed_when: log_dir.rc != 0
- name: Create ironic log dir
file:
path: "{{ item.path }}"
state: directory
owner: "{{ item.owner|default(ironic_system_user_name) }}"
group: "{{ item.group|default(ironic_system_group_name) }}"
mode: "{{ item.mode|default('0755') }}"
with_items:
- { path: "{{ ironic_system_log_folder }}" }
when: log_dir.rc != 0

View File

@ -16,7 +16,7 @@ lazy-apps = true
add-header = Connection: close add-header = Connection: close
buffer-size = {{ ironic_wsgi_buffer_size }} buffer-size = {{ ironic_wsgi_buffer_size }}
thunder-lock = true thunder-lock = true
logfile-chmod = 644 disable-logging = true
# Avoid filling up the logs with health check requests from haproxy. # Avoid filling up the logs with health check requests from haproxy.
route-user-agent = ^osa-haproxy-healthcheck$ donotlog: route-user-agent = ^osa-haproxy-healthcheck$ donotlog:

View File

@ -3,6 +3,7 @@
[DEFAULT] [DEFAULT]
# Disable stderr logging # Disable stderr logging
use_stderr = False use_stderr = False
use_journal = True
debug = {{ debug }} debug = {{ debug }}
auth_strategy = {{ ironic_auth_strategy }} auth_strategy = {{ ironic_auth_strategy }}

View File

@ -31,7 +31,6 @@ neutron_network_device_mtu: 1500
neutron_l2_population: True neutron_l2_population: True
neutron_dhcp_config: neutron_dhcp_config:
dhcp-option-force: "26,1500" dhcp-option-force: "26,1500"
log-facility: "/var/log/neutron/neutron-dnsmasq.log"
ironic_neutron_provisioning_network_name: "ironic-prov" ironic_neutron_provisioning_network_name: "ironic-prov"
neutron_l3: True neutron_l3: True
neutron_metadata: True neutron_metadata: True

View File

@ -18,9 +18,11 @@ cache_timeout: 600
ironic_devel_distro_packages: ironic_devel_distro_packages:
- git-core - git-core
- libffi-dev - libffi-dev
- libsystemd-dev
ironic_api_distro_packages: ironic_api_distro_packages:
- libxml2-dev - libxml2-dev
- python-systemd
ironic_conductor_distro_packages: ironic_conductor_distro_packages:
- libxml2-dev - libxml2-dev

View File

@ -18,9 +18,11 @@ cache_timeout: 600
ironic_devel_distro_packages: ironic_devel_distro_packages:
- git-core - git-core
- libffi-devel - libffi-devel
- systemd-devel
ironic_api_distro_packages: ironic_api_distro_packages:
- libxml2-devel - libxml2-devel
- systemd-python
ironic_conductor_distro_packages: ironic_conductor_distro_packages:
- libxml2-devel - libxml2-devel

View File

@ -18,9 +18,11 @@ cache_timeout: 600
ironic_devel_distro_packages: ironic_devel_distro_packages:
- git-core - git-core
- libffi-devel - libffi-devel
- systemd-devel
ironic_api_distro_packages: ironic_api_distro_packages:
- libxml2-devel - libxml2-devel
- python-systemd
ironic_conductor_distro_packages: ironic_conductor_distro_packages:
- ipmitool - ipmitool