From bcc7f1511ef3d01ddabca9fd6f3fbaa772b12c47 Mon Sep 17 00:00:00 2001 From: Florian Haas Date: Wed, 20 Feb 2019 23:40:23 +0100 Subject: [PATCH] Fix evaluation of cinder_scheduler_default_filters, remove confusing comment Change I12859167d19b9f40e3378ac08fed094a42f40bc7, merged just today, put the evaluation of cinder_scheduler_default_filters inside an {% if } block that it wasn't meant to be inside. As a consequence, that setting would be ignored more often that it would be honored. What threw me (sorry about that) was that I had tested this patch on a Queens box, and stubbornly copied into the template on master. And changes I02d2bae8712c0ca223cafb5a43304806c4b83125 and Ib5a128e82e5251077e341b5f428eb097bcc17590 had left the template in a somewhat confusing state: the template had retained the "## Cinder API's enabled" comment despite the fact that there were no settings left to enable or disable any APIs. So, with this change the evaluation of cinder_scheduler_default_filters goes to the right place (i.e. outside the {% if } block), *and* the confusing API comment is removed. Change-Id: Ic5707615571e62ba2326e2ad436333bac246c8dd --- templates/cinder.conf.j2 | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/templates/cinder.conf.j2 b/templates/cinder.conf.j2 index b7ac576c..aaa93d51 100644 --- a/templates/cinder.conf.j2 +++ b/templates/cinder.conf.j2 @@ -14,15 +14,14 @@ rootwrap_config = /etc/cinder/rootwrap.conf api_paste_config = /etc/cinder/api-paste.ini auth_strategy = {{ cinder_auth_strategy }} -## Cinder API's enabled -{% if cinder_services['cinder-volume']['group'] in group_names %} -{% if cinder_service_backup_program_enabled == true %} - ## Cinder Scheduler {% if cinder_scheduler_default_filters is defined %} scheduler_default_filters={{ cinder_scheduler_default_filters | join(',') }} {% endif %} +{% if cinder_services['cinder-volume']['group'] in group_names %} +{% if cinder_service_backup_program_enabled == true %} + ## Cinder Backup backup_driver = {{ cinder_service_backup_driver }} backup_metadata_version = {{ cinder_service_backup_metadata_version }}