910f9bd36f
First part of patchset: https://review.opendev.org/c/openstack/kolla-ansible/+/799229/ in which was suggested to split patch into smaller ones. This implements kolla_container_engine variable in command calls of docker,so later on it can be also used for podman without further change. Signed-off-by: Ivan Halomi <i.halomi@partner.samsung.com> Change-Id: Ic30b67daa2e215524096ad1f4385c569e3d41b95
31 lines
1007 B
YAML
31 lines
1007 B
YAML
---
|
|
- name: Check nova upgrade status
|
|
become: true
|
|
command: "{{ kolla_container_engine }} exec -t nova_api nova-status upgrade check"
|
|
register: nova_upgrade_check_stdout
|
|
when: inventory_hostname == groups['nova-api'][0]
|
|
failed_when: false
|
|
|
|
- name: Upgrade status check result
|
|
fail:
|
|
msg:
|
|
- "There was an upgrade status check failure!"
|
|
- "See the detail at https://docs.openstack.org/nova/latest/cli/nova-status.html#nova-status-checks"
|
|
vars:
|
|
first_nova_api_host: "{{ groups['nova-api'][0] }}"
|
|
when: hostvars[first_nova_api_host]['nova_upgrade_check_stdout']['rc'] not in [0, 1]
|
|
|
|
- name: Stopping top level nova services
|
|
become: true
|
|
kolla_docker:
|
|
action: "stop_container"
|
|
common_options: "{{ docker_common_options }}"
|
|
name: "{{ item.value.container_name }}"
|
|
with_dict: "{{ nova_services }}"
|
|
when:
|
|
- inventory_hostname in groups[item.value.group]
|
|
- item.value.enabled | bool
|
|
- nova_safety_upgrade | bool
|
|
|
|
- import_tasks: rolling_upgrade.yml
|