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: Id68c80b52fe72bd209e96dba230b4f2cb12f900d
This commit is contained in:
parent
4a06ebda96
commit
47e2784138
@ -141,6 +141,7 @@ tacker_pip_packages:
|
||||
- PyMySQL
|
||||
- python-heatclient
|
||||
- python-tackerclient
|
||||
- systemd-python
|
||||
- tacker
|
||||
|
||||
tacker_config_options: --config-file {{ tacker_etc_dir }}/tacker.conf
|
||||
|
@ -101,7 +101,7 @@
|
||||
- service_name: "{{ tacker_service_name }}"
|
||||
enabled: yes
|
||||
state: started
|
||||
execstarts: "{{ tacker_bin }}/{{ tacker_program_name }} {{ tacker_config_options|default('') }} --log-file=/var/log/tacker/{{ tacker_program_name }}.log"
|
||||
execstarts: "{{ tacker_bin }}/{{ tacker_program_name }} {{ tacker_config_options|default('') }}"
|
||||
config_overrides: "{{ tacker_init_config_overrides }}"
|
||||
tags:
|
||||
- systemd-service
|
||||
|
@ -49,39 +49,3 @@
|
||||
- path: "{{ tacker_etc_dir }}/rootwrap.d"
|
||||
owner: "root"
|
||||
group: "root"
|
||||
|
||||
|
||||
#- name: Create tacker venv dir
|
||||
#file:
|
||||
#path: "{{ item.path }}"
|
||||
#state: directory
|
||||
#with_items:
|
||||
#- { path: "/openstack/venvs" }
|
||||
#- { path: "{{ tacker_venv_bin }}" }
|
||||
#when: tacker_venv_enabled | bool
|
||||
#tags:
|
||||
#- tacker-dirs
|
||||
|
||||
- name: Test for log directory or link
|
||||
shell: |
|
||||
if [ -h "/var/log/tacker" ]; then
|
||||
chown -h {{ tacker_system_user_name }}:{{ tacker_system_group_name }} "/var/log/tacker"
|
||||
chown -R {{ tacker_system_user_name }}:{{ tacker_system_group_name }} "$(readlink /var/log/tacker)"
|
||||
else
|
||||
exit 1
|
||||
fi
|
||||
register: log_dir
|
||||
failed_when: false
|
||||
changed_when: log_dir.rc != 0
|
||||
|
||||
- name: Create tacker log dir
|
||||
file:
|
||||
path: "{{ item.path }}"
|
||||
state: directory
|
||||
owner: "{{ item.owner|default(tacker_system_user_name) }}"
|
||||
group: "{{ item.group|default(tacker_system_group_name) }}"
|
||||
mode: "{{ item.mode|default('0755') }}"
|
||||
with_items:
|
||||
- { path: "/var/log/tacker" }
|
||||
when: log_dir.rc != 0
|
||||
|
||||
|
@ -25,6 +25,7 @@ policy_file = {{ tacker_etc_dir }}/policy.json
|
||||
# (not user_stderr) and (not log_file) -> stdout
|
||||
# publish_errors -> notification system
|
||||
|
||||
use_journal = True
|
||||
use_syslog = False
|
||||
# syslog_log_facility = LOG_USER
|
||||
|
||||
|
@ -21,7 +21,4 @@ cache_timeout: 600
|
||||
tacker_distro_packages:
|
||||
- rsync
|
||||
- git
|
||||
#- remove after testing
|
||||
- python-pip
|
||||
#- remove after testing
|
||||
- python-mysqldb
|
||||
- libsystemd-dev
|
||||
|
@ -14,3 +14,4 @@
|
||||
tacker_distro_packages:
|
||||
- rsync
|
||||
- git-core
|
||||
- systemd-devel
|
||||
|
@ -16,3 +16,4 @@
|
||||
tacker_distro_packages:
|
||||
- rsync
|
||||
- git-core
|
||||
- systemd-devel
|
||||
|
Loading…
Reference in New Issue
Block a user