Browse Source

Merge "Octavia: do not attempt container restart on empty list"

tags/1.2.0
Zuul 1 week ago
parent
commit
24d0651c03
1 changed files with 11 additions and 1 deletions
  1. +11
    -1
      tripleo_ansible/roles/octavia_controller_post_config/tasks/main.yml

+ 11
- 1
tripleo_ansible/roles/octavia_controller_post_config/tasks/main.yml View File

@@ -49,12 +49,22 @@
when:
- octavia_config_updated

- name: get list of running octavia containers
become: true
shell: |
sudo "{{ container_cli }}" ps -f name=octavia -q
register: running_octavia_containers
when:
- octavia_config_updated

- name: restart octavia containers
become: true
become_user: root
shell: "{{ container_cli }} restart $(sudo {{ container_cli }} ps -f name=octavia -q)"
shell: "{{ container_cli }} restart {{ running_octavia_containers.stdout }}"
when:
- octavia_config_updated
- running_octavia_containers.rc != 0
- (running_octavia_containers.stdout|length) > 0

- name: remove directory /etc/octavia/conf.d/common (LP#1836074)
file:

Loading…
Cancel
Save