Michal Nasiadka 1ef765f690 cinder: Stop using admin service token
In order to do this - we need to add service role to Nova and Cinder.

Closes-Bug: #2049762

Change-Id: Ic121bf9f90c9865cd4d08890c80247570ef310ae
2024-02-15 12:07:39 +00:00

54 lines
1.6 KiB
YAML

---
# 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 }}"
- name: Run Nova upgrade checks
become: true
vars:
nova_api: "{{ nova_services['nova-api'] }}"
kolla_container:
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"
restart_policy: oneshot
volumes: "{{ nova_api_default_volumes + nova_api_extra_volumes }}"
run_once: True
register: nova_upgrade_check_stdout
delegate_to: "{{ groups['nova-api'][0] }}"
failed_when: false
check_mode: 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_container:
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