2016-01-26 11:22:54 -06:00
|
|
|
---
|
2024-02-08 12:01:20 +01:00
|
|
|
# TODO(bbezak): Remove this task in the Dalmatian cycle.
|
|
|
|
- import_role:
|
|
|
|
name: service-ks-register
|
|
|
|
vars:
|
|
|
|
service_ks_register_auth: "{{ openstack_nova_auth }}"
|
|
|
|
service_ks_register_user_roles: "{{ nova_ks_user_roles }}"
|
|
|
|
|
2023-01-20 13:32:11 +00:00
|
|
|
- name: Run Nova upgrade checks
|
2018-05-30 11:25:19 +07:00
|
|
|
become: true
|
2023-01-20 13:32:11 +00:00
|
|
|
vars:
|
|
|
|
nova_api: "{{ nova_services['nova-api'] }}"
|
2023-11-08 14:17:51 +01:00
|
|
|
kolla_container:
|
2023-01-20 13:32:11 +00:00
|
|
|
action: "start_container"
|
|
|
|
common_options: "{{ docker_common_options }}"
|
|
|
|
detach: False
|
|
|
|
environment:
|
|
|
|
KOLLA_UPGRADE_CHECK:
|
|
|
|
KOLLA_CONFIG_STRATEGY: "{{ config_strategy }}"
|
|
|
|
image: "{{ nova_api.image }}"
|
|
|
|
labels:
|
|
|
|
UPGRADE:
|
|
|
|
name: "nova_upgrade_checks"
|
2023-04-27 11:41:55 +02:00
|
|
|
restart_policy: oneshot
|
2023-01-20 13:32:11 +00:00
|
|
|
volumes: "{{ nova_api_default_volumes + nova_api_extra_volumes }}"
|
|
|
|
run_once: True
|
2018-04-04 16:52:51 +07:00
|
|
|
register: nova_upgrade_check_stdout
|
2023-01-20 13:32:11 +00:00
|
|
|
delegate_to: "{{ groups['nova-api'][0] }}"
|
2019-06-28 13:33:39 +00:00
|
|
|
failed_when: false
|
2023-04-19 16:19:59 +01:00
|
|
|
check_mode: false
|
2015-12-07 15:34:22 -06:00
|
|
|
|
2018-04-04 16:52:51 +07:00
|
|
|
- name: Upgrade status check result
|
|
|
|
fail:
|
|
|
|
msg:
|
2019-06-28 13:33:39 +00:00
|
|
|
- "There was an upgrade status check failure!"
|
2018-04-04 16:52:51 +07:00
|
|
|
- "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] }}"
|
2019-06-28 13:33:39 +00:00
|
|
|
when: hostvars[first_nova_api_host]['nova_upgrade_check_stdout']['rc'] not in [0, 1]
|
2015-12-07 15:34:22 -06:00
|
|
|
|
2019-08-19 15:52:46 +01:00
|
|
|
- name: Stopping top level nova services
|
|
|
|
become: true
|
2023-11-08 14:17:51 +01:00
|
|
|
kolla_container:
|
2019-08-19 15:52:46 +01:00
|
|
|
action: "stop_container"
|
|
|
|
common_options: "{{ docker_common_options }}"
|
|
|
|
name: "{{ item.value.container_name }}"
|
2024-03-30 22:22:43 +01:00
|
|
|
with_dict: "{{ nova_services | select_services_enabled_and_mapped_to_host }}"
|
2019-08-19 15:52:46 +01:00
|
|
|
when:
|
|
|
|
- nova_safety_upgrade | bool
|
|
|
|
|
2020-06-29 15:06:53 +01:00
|
|
|
- import_tasks: rolling_upgrade.yml
|