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. Depends-On: https://review.opendev.org/670824/ Change-Id: I8cfdd46a57a91ef3b1879bf85b03cced74234451
This commit is contained in:
parent
9d86b5f0aa
commit
048a43bd81
@ -160,6 +160,7 @@ octavia_pip_packages:
|
||||
- python-octaviaclient
|
||||
- octavia
|
||||
- shade
|
||||
- systemd-python
|
||||
- uwsgi
|
||||
|
||||
# Specific pip packages provided by the user
|
||||
|
@ -28,6 +28,7 @@
|
||||
name: "python_venv_build"
|
||||
vars:
|
||||
venv_build_constraints: "{{ octavia_git_constraints }}"
|
||||
venv_build_distro_package_list: "{{ octavia_devel_distro_packages }}"
|
||||
venv_install_destination_path: "{{ octavia_bin | dirname }}"
|
||||
venv_install_distro_package_list: "{{ octavia_distro_packages }}"
|
||||
venv_pip_install_args: "{{ octavia_pip_install_args }}"
|
||||
|
@ -44,28 +44,3 @@
|
||||
- { path: "/etc/octavia/templates" }
|
||||
- { path: "/var/cache/octavia", mode: "0700" }
|
||||
- { path: "{{ octavia_system_home_folder }}" }
|
||||
|
||||
- name: Test for log directory or link
|
||||
shell: |
|
||||
if [ -h "/var/log/octavia" ]; then
|
||||
chown -h {{ octavia_system_user_name }}:{{ octavia_system_group_name }} "/var/log/octavia"
|
||||
chown -R {{ octavia_system_user_name }}:{{ octavia_system_group_name }} "$(readlink /var/log/octavia)"
|
||||
else
|
||||
exit 1
|
||||
fi
|
||||
register: log_dir
|
||||
failed_when: false
|
||||
changed_when: log_dir.rc != 0
|
||||
|
||||
- name: Create octavia log dir
|
||||
file:
|
||||
path: "{{ item.path }}"
|
||||
state: directory
|
||||
owner: "{{ item.owner|default(octavia_system_user_name) }}"
|
||||
group: "{{ item.group|default(octavia_system_group_name) }}"
|
||||
mode: "{{ item.mode|default('0755') }}"
|
||||
with_items:
|
||||
- { path: "/var/log/octavia" }
|
||||
when: log_dir.rc != 0
|
||||
|
||||
|
||||
|
@ -18,7 +18,7 @@ lazy-apps = true
|
||||
add-header = Connection: close
|
||||
buffer-size = {{ octavia_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.
|
||||
|
@ -1,7 +1,7 @@
|
||||
[DEFAULT]
|
||||
# Print debugging output (set logging level to DEBUG instead of default WARNING level).
|
||||
debug = {{ debug }}
|
||||
log_dir = /var/log/octavia
|
||||
use_journal = True
|
||||
|
||||
{% if not octavia_v2|bool %}
|
||||
bind_host = 0.0.0.0
|
||||
|
@ -57,7 +57,6 @@ neutron_network_device_mtu: 1500
|
||||
neutron_l2_population: True
|
||||
neutron_dhcp_config:
|
||||
dhcp-option-force: "26,1500"
|
||||
log-facility: "/var/log/neutron/neutron-dnsmasq.log"
|
||||
neutron_l3: True
|
||||
neutron_metadata: True
|
||||
|
||||
|
@ -22,6 +22,9 @@ octavia_distro_packages:
|
||||
- libxml2-dev
|
||||
- netfilter-persistent
|
||||
|
||||
octavia_devel_distro_packages:
|
||||
- libsystemd-dev
|
||||
|
||||
octavia_service_distro_packages:
|
||||
- octavia-common
|
||||
- octavia-api
|
||||
@ -29,6 +32,7 @@ octavia_service_distro_packages:
|
||||
- octavia-housekeeping
|
||||
- octavia-worker
|
||||
- python-pymysql
|
||||
- python-systemd
|
||||
- uwsgi
|
||||
- uwsgi-plugin-python
|
||||
|
||||
|
@ -19,12 +19,16 @@ octavia_distro_packages:
|
||||
- libxml2-devel
|
||||
- git
|
||||
|
||||
octavia_devel_distro_packages:
|
||||
- systemd-devel
|
||||
|
||||
octavia_service_distro_packages:
|
||||
- openstack-octavia-common
|
||||
- openstack-octavia-api
|
||||
- openstack-octavia-health-manager
|
||||
- openstack-octavia-housekeeping
|
||||
- openstack-octavia-worker
|
||||
- systemd-python
|
||||
- uwsgi
|
||||
- uwsgi-plugin-python
|
||||
|
||||
|
@ -17,3 +17,6 @@ octavia_distro_packages:
|
||||
- iptables
|
||||
- libxml2-devel
|
||||
- git-core
|
||||
|
||||
octavia_devel_distro_packages:
|
||||
- systemd-devel
|
Loading…
Reference in New Issue
Block a user