From ddddfde34d0cee46d2261eee638ab6589a1fd52c Mon Sep 17 00:00:00 2001 From: Dmitriy Rabotyagov Date: Mon, 20 May 2024 11:08:02 +0200 Subject: [PATCH] Allow to skip volume type management by role Right now it is not possible to avoid creation of a default volume type which will have the same name as a backend. In case operator want to rename volume type or have a different name - it will not be possible as of today. While we should migrate to using openstack_resources role for managing of QoS and volume_types [1], the patch/modules are not ready and will not be backportable anyway. [1] https://review.opendev.org/c/openstack/openstack-ansible-plugins/+/906372 Change-Id: Ic1e190fc86bd3b6fd2cc771273e28b5bb095a322 --- defaults/main.yml | 2 ++ .../notes/allow_to_skip_volume_types-8698ec60660a0510.yaml | 5 +++++ tasks/main.yml | 7 ++++++- 3 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 releasenotes/notes/allow_to_skip_volume_types-8698ec60660a0510.yaml diff --git a/defaults/main.yml b/defaults/main.yml index 65c3b8db..48c4e1f2 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -310,6 +310,8 @@ cinder_quota_backup_gigabytes: 1000 # - lvm_high_iops # - lvm_low_iops +cinder_manage_volume_types: True + # Override generated device filter in lvm.conf # Example: # cinder_lvm_devices_filter_override: diff --git a/releasenotes/notes/allow_to_skip_volume_types-8698ec60660a0510.yaml b/releasenotes/notes/allow_to_skip_volume_types-8698ec60660a0510.yaml new file mode 100644 index 00000000..66d001f5 --- /dev/null +++ b/releasenotes/notes/allow_to_skip_volume_types-8698ec60660a0510.yaml @@ -0,0 +1,5 @@ +--- +features: + - | + Added variable ``cinder_manage_volume_types`` that allows to skip volume + type creation and management by os_cinder role. diff --git a/tasks/main.yml b/tasks/main.yml index 0e921e79..2d0f5f18 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -260,10 +260,15 @@ - cinder-config - name: Importing cinder_backends tasks - import_tasks: cinder_backends.yml + include_tasks: cinder_backends.yml + args: + apply: + tags: + - cinder-config when: - "groups[cinder_services['cinder-volume']['group']] | length > 0" - "_cinder_is_last_play_host" + - cinder_manage_volume_types | bool tags: - cinder-config