Pierre Riteau b06784e875 Fix monasca-thresh upgrade
Change Ib225d76076782d695c9387e1c2693bae9a4521d7 introduced a new
upgrade task for monasca-thresh. Because the task is not restricted to
the correct group, it fails while trying to stop monasca_thresh on hosts
not running this container.

Change-Id: I33c2c458a98145315b0de0c069f13b83f59622eb
Closes-Bug: #1952408
2021-11-26 11:04:41 +01:00

28 lines
795 B
YAML

---
- import_tasks: config.yml
- import_tasks: cleanup.yml
- import_tasks: check-containers.yml
- import_tasks: register.yml
- import_tasks: bootstrap_service.yml
# NOTE(sshambar): We don't want pre-upgrade monasca-thresh instances
# running in local mode after an upgrade, so stop them.
# The first node will be replaced with the submission container in the
# handlers below.
- name: Stopping all monasca-thresh instances but the first node
become: true
kolla_docker:
action: "stop_container"
common_options: "{{ docker_common_options }}"
name: "{{ monasca_services['monasca-thresh']['container_name'] }}"
when:
- inventory_hostname in groups['monasca-thresh']
- inventory_hostname != groups['monasca-thresh']|first
- name: Flush handlers
meta: flush_handlers