From 6a8cfbb9333340d872537c49b1af16f44c50ace9 Mon Sep 17 00:00:00 2001 From: Michal Nasiadka Date: Tue, 10 Dec 2019 18:13:30 +0100 Subject: [PATCH] External Ceph: template cinder backend config when cinder_backend_ceph Currently External Ceph Cinder config requires the user to create cinder service custom configuration. This change alters the if/else statements to template out cinder backends configuration when cinder_backend_ceph is True. Change-Id: I143c3b44d2839e56d1dbf28484c0eaae0a753dc9 --- ansible/roles/cinder/defaults/main.yml | 2 +- ansible/roles/cinder/templates/cinder.conf.j2 | 2 +- .../external-ceph-cinder-template-40dc0bc07e717837.yaml | 8 ++++++++ 3 files changed, 10 insertions(+), 2 deletions(-) create mode 100644 releasenotes/notes/external-ceph-cinder-template-40dc0bc07e717837.yaml diff --git a/ansible/roles/cinder/defaults/main.yml b/ansible/roles/cinder/defaults/main.yml index 9ac0cb8d31..36c8d3c073 100644 --- a/ansible/roles/cinder/defaults/main.yml +++ b/ansible/roles/cinder/defaults/main.yml @@ -181,7 +181,7 @@ openstack_cinder_auth: "{{ openstack_auth }}" #################### cinder_backends: - name: "rbd-1" - enabled: "{{ enable_ceph | bool and cinder_backend_ceph | bool }}" + enabled: "{{ cinder_backend_ceph | bool }}" - name: "lvm-1" enabled: "{{ enable_cinder_backend_lvm | bool }}" - name: "nfs-1" diff --git a/ansible/roles/cinder/templates/cinder.conf.j2 b/ansible/roles/cinder/templates/cinder.conf.j2 index e4c6001952..410d63312b 100644 --- a/ansible/roles/cinder/templates/cinder.conf.j2 +++ b/ansible/roles/cinder/templates/cinder.conf.j2 @@ -119,7 +119,7 @@ target_helper = {{ cinder_target_helper }} target_protocol = iscsi {% endif %} -{% if enable_ceph | bool and cinder_backend_ceph | bool %} +{% if cinder_backend_ceph | bool %} [rbd-1] volume_driver = cinder.volume.drivers.rbd.RBDDriver volume_backend_name = rbd-1 diff --git a/releasenotes/notes/external-ceph-cinder-template-40dc0bc07e717837.yaml b/releasenotes/notes/external-ceph-cinder-template-40dc0bc07e717837.yaml new file mode 100644 index 0000000000..4d486cd5f7 --- /dev/null +++ b/releasenotes/notes/external-ceph-cinder-template-40dc0bc07e717837.yaml @@ -0,0 +1,8 @@ +--- +upgrade: + - | + Default behavior for generating cinder.conf template has changed, + now cinder.conf with rbd-1 section will be generated when external Ceph + functionality is used i.e. cinder_backend_ceph is set to true. + Previously it was only included when Kolla-Ansible internal + Ceph deployment mechanism was used.