Add backwards compatibility of ceph_components format
With [1] we have broken compatibility of potentially provided extra components config without any notice. In order to handle this now we fix backwards compatibility along with adding a deprecation note on the format of ``client``. [1] https://review.opendev.org/c/openstack/openstack-ansible-ceph_client/+/882827 Closes-Bug: #2047783 Change-Id: I89b67f0f0545d799194d8486a6bb25227279af84
This commit is contained in:
parent
43c9071f4f
commit
6bb5f7dcdb
@ -159,7 +159,7 @@ configurations need to be added to the user variable file:
|
|||||||
- component: gnocchi_api
|
- component: gnocchi_api
|
||||||
package: "{{ python_ceph_packages }}"
|
package: "{{ python_ceph_packages }}"
|
||||||
client:
|
client:
|
||||||
- '{{ gnocchi_ceph_client }}'
|
- name: '{{ gnocchi_ceph_client }}'
|
||||||
service: '{{ ceph_gnocchi_service_names }}'
|
service: '{{ ceph_gnocchi_service_names }}'
|
||||||
|
|
||||||
|
|
||||||
|
@ -0,0 +1,13 @@
|
|||||||
|
---
|
||||||
|
|
||||||
|
deprecations:
|
||||||
|
- |
|
||||||
|
Format of ``client`` key inside ``ceph_extra_components`` variable has been
|
||||||
|
deprecated in favor of a mapping with one required attribute ``name``.
|
||||||
|
Having ``client`` key defined as a simple list is kept for backwards compatibility
|
||||||
|
but will be removed in future releases.
|
||||||
|
|
||||||
|
fixes:
|
||||||
|
- |
|
||||||
|
Backwards compatibility of ``client`` key inside ``ceph_extra_components`` variable
|
||||||
|
has been fixed to support both a list and a list of mappings.
|
@ -59,7 +59,7 @@ ceph_extra_components: []
|
|||||||
# package:
|
# package:
|
||||||
# - "{{ python_ceph_package }}"
|
# - "{{ python_ceph_package }}"
|
||||||
# client:
|
# client:
|
||||||
# - '{{ gnocchi_ceph_client }}'
|
# - name: '{{ gnocchi_ceph_client }}'
|
||||||
# service: '{{ ceph_gnocchi_service_names }}'
|
# service: '{{ ceph_gnocchi_service_names }}'
|
||||||
|
|
||||||
ceph_client_filtered_packages: |-
|
ceph_client_filtered_packages: |-
|
||||||
@ -94,7 +94,9 @@ ceph_client_filtered_clients: |-
|
|||||||
(cinder_service_backup_driver is defined and
|
(cinder_service_backup_driver is defined and
|
||||||
'ceph' in cinder_service_backup_driver))) %}
|
'ceph' in cinder_service_backup_driver))) %}
|
||||||
{% for client in comp.client %}
|
{% for client in comp.client %}
|
||||||
{% if client['enabled'] | default(true) | bool %}
|
{% if client is not mapping %}
|
||||||
|
{% set _ = clients.append({'name': client}) %}
|
||||||
|
{% elif client['enabled'] | default(true) | bool %}
|
||||||
{% set _ = clients.append(client) %}
|
{% set _ = clients.append(client) %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user