
This might fix some hidden bugs where the check tasks forgot to include params important for the service. We also get a nice optimisation by using a filtered loop instead of task skipping per service with 'when'. As proven in https://review.opendev.org/c/openstack/kolla-ansible/+/914997 This refactoring allows for further optimisation and fixing work to proceed with much less hassle. Including getting rid of many notify statements as the restarts are now safely handled by check-containers. Some notifies had to stay, because of special edge cases eg. in rolling upgrades and loadbalancer config. One downside is we remove the little optimisation for Zun that ignored config change for copying loopback but this is an acceptable tradeoff considering the benefits above. Co-Authored-By: Roman Krček <roman.krcek@tietoevry.com> Change-Id: I855dfef33aa0f3fd1301295bb8ede3e587e7162a Partially-Implements: blueprint performance-improvements
44 lines
1.4 KiB
YAML
44 lines
1.4 KiB
YAML
---
|
|
- name: Ensuring glance service ceph config subdir exists
|
|
vars:
|
|
service: "{{ glance_services['glance-api'] }}"
|
|
file:
|
|
path: "{{ node_config_directory }}/glance-api/ceph"
|
|
state: "directory"
|
|
owner: "{{ config_owner_user }}"
|
|
group: "{{ config_owner_group }}"
|
|
mode: "0770"
|
|
become: true
|
|
when: service | service_enabled_and_mapped_to_host
|
|
|
|
- name: Copy over multiple ceph configs for Glance
|
|
merge_configs:
|
|
sources:
|
|
- "{{ node_custom_config }}/glance/{{ item.cluster }}.conf"
|
|
- "{{ node_custom_config }}/glance/glance-api/{{ item.cluster }}.conf"
|
|
dest: "{{ node_config_directory }}/glance-api/ceph/{{ item.cluster }}.conf"
|
|
mode: "0660"
|
|
become: true
|
|
when: inventory_hostname in groups['glance-api']
|
|
with_items: "{{ glance_ceph_backends }}"
|
|
|
|
- name: Copy over ceph Glance keyrings
|
|
vars:
|
|
keyring: "{{ item.cluster }}.client.{{ item.user }}.keyring"
|
|
template:
|
|
src: "{{ node_custom_config }}/glance/{{ keyring }}"
|
|
dest: "{{ node_config_directory }}/glance-api/ceph/{{ keyring }}"
|
|
mode: "0660"
|
|
become: true
|
|
with_items: "{{ glance_ceph_backends }}"
|
|
when: inventory_hostname in groups['glance-api']
|
|
|
|
- name: Ensuring config directory has correct owner and permission
|
|
file:
|
|
path: "{{ node_config_directory }}/glance-api"
|
|
recurse: yes
|
|
owner: "{{ config_owner_user }}"
|
|
group: "{{ config_owner_group }}"
|
|
become: true
|
|
when: inventory_hostname in groups['glance-api']
|