Restart octavia rsyslog after updating the config

After creating the octavia rsyslog configuration file, the
octavia_rsyslog container must be restarted if it's already running,
otherwise the new configuration is not applied in the container.

This issue is new, the octavia-ansible playbook was moved from step 5 to
post_deploy, which means that the file is now created after the first start
of the container.

Change-Id: Ibb439d47d551adc5af2d87234b732565af1cc90f
(cherry picked from commit 0a6f775201)
(cherry picked from commit 5d022f1c66)
This commit is contained in:
Gregory Thiemonge 2021-06-25 11:19:39 +02:00
parent 23ad289558
commit 496e73cb23
1 changed files with 17 additions and 0 deletions

View File

@ -41,6 +41,23 @@
dest: "{{ octavia_confd_prefix }}/etc/rsyslog.d/10-octavia.conf"
selevel: s0
setype: svirt_sandbox_file_t
- name: check if octavia rsyslog is running
become: true
become_user: root
shell: |
systemctl is-active --quiet tripleo_octavia_rsyslog
failed_when: false
register: octavia_rsyslog_service
- name: restart octavia rsyslog service
become: true
become_user: root
systemd:
name: tripleo_octavia_rsyslog
state: restarted
when:
- octavia_rsyslog_service.rc == 0
when: enable_log_offloading | bool
- name: read the current IP list