From 5d3ca8b09ef78698c8f7a137909010c9d0f3a1f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rados=C5=82aw=20Piliszek?= Date: Thu, 30 Jul 2020 15:41:37 +0200 Subject: [PATCH] Fix Masakari role missing deploy-containers Masakari was introduced parallelly to deploy-containers action and so we missed to add this functionality to it. Change-Id: Ibef198d20d481bc92b38af786cdf0292b246bb12 Closes-Bug: #1889611 --- .../roles/masakari/tasks/check-containers.yml | 17 +++++++++++++++++ ansible/roles/masakari/tasks/config.yml | 19 ++----------------- .../masakari/tasks/deploy-containers.yml | 2 ++ .../notes/bug-1889611-f08c228fca884bf2.yaml | 5 +++++ 4 files changed, 26 insertions(+), 17 deletions(-) create mode 100644 ansible/roles/masakari/tasks/check-containers.yml create mode 100644 ansible/roles/masakari/tasks/deploy-containers.yml create mode 100644 releasenotes/notes/bug-1889611-f08c228fca884bf2.yaml diff --git a/ansible/roles/masakari/tasks/check-containers.yml b/ansible/roles/masakari/tasks/check-containers.yml new file mode 100644 index 0000000000..37ab002434 --- /dev/null +++ b/ansible/roles/masakari/tasks/check-containers.yml @@ -0,0 +1,17 @@ +--- +- name: Check masakari containers + become: true + kolla_docker: + action: "compare_container" + common_options: "{{ docker_common_options }}" + name: "{{ item.value.container_name }}" + image: "{{ item.value.image }}" + privileged: "{{ item.value.privileged | default(False) }}" + volumes: "{{ item.value.volumes | reject('equalto', '') | list }}" + dimensions: "{{ item.value.dimensions }}" + when: + - inventory_hostname in groups[item.value.group] + - item.value.enabled | bool + with_dict: "{{ masakari_services }}" + notify: + - Restart {{ item.key }} container diff --git a/ansible/roles/masakari/tasks/config.yml b/ansible/roles/masakari/tasks/config.yml index 047814dcb1..043b0b43e7 100644 --- a/ansible/roles/masakari/tasks/config.yml +++ b/ansible/roles/masakari/tasks/config.yml @@ -132,20 +132,5 @@ notify: - Restart masakari-api container -- name: Check masakari containers - become: true - kolla_docker: - action: "compare_container" - common_options: "{{ docker_common_options }}" - name: "{{ item.value.container_name }}" - image: "{{ item.value.image }}" - privileged: "{{ item.value.privileged | default(False) }}" - volumes: "{{ item.value.volumes | reject('equalto', '') | list }}" - dimensions: "{{ item.value.dimensions }}" - when: - - kolla_action != "config" - - inventory_hostname in groups[item.value.group] - - item.value.enabled | bool - with_dict: "{{ masakari_services }}" - notify: - - Restart {{ item.key }} container +- import_tasks: check-containers.yml + when: kolla_action != "config" diff --git a/ansible/roles/masakari/tasks/deploy-containers.yml b/ansible/roles/masakari/tasks/deploy-containers.yml new file mode 100644 index 0000000000..eb24ab5c7a --- /dev/null +++ b/ansible/roles/masakari/tasks/deploy-containers.yml @@ -0,0 +1,2 @@ +--- +- import_tasks: check-containers.yml diff --git a/releasenotes/notes/bug-1889611-f08c228fca884bf2.yaml b/releasenotes/notes/bug-1889611-f08c228fca884bf2.yaml new file mode 100644 index 0000000000..979b97fe97 --- /dev/null +++ b/releasenotes/notes/bug-1889611-f08c228fca884bf2.yaml @@ -0,0 +1,5 @@ +--- +fixes: + - | + Fixes ``deploy-containers`` action missing for the Masakari role. + `LP#1889611 `__