From fcf9c5cdf98b11b91c1919b5167f740cd7276583 Mon Sep 17 00:00:00 2001 From: Mykyta Karpin Date: Fri, 17 Feb 2017 18:02:49 +0200 Subject: [PATCH] Enable proxy headers parsing As cinder is placed behind the proxy we need to enable proxy headers parsing, so cinder is aware about about protocol used to connect to endpoint. Change-Id: If68de7d52617803b379ed564f07ed6c947315dbd Closes-Bug: #1665361 --- .../openstack_cinder/openstack_cinder.pp | 29 ++++++++++--------- .../openstack-cinder/openstack-cinder_spec.rb | 3 +- 2 files changed, 17 insertions(+), 15 deletions(-) diff --git a/deployment/puppet/openstack_tasks/manifests/openstack_cinder/openstack_cinder.pp b/deployment/puppet/openstack_tasks/manifests/openstack_cinder/openstack_cinder.pp index f5e3e89abf..89a11a5087 100644 --- a/deployment/puppet/openstack_tasks/manifests/openstack_cinder/openstack_cinder.pp +++ b/deployment/puppet/openstack_tasks/manifests/openstack_cinder/openstack_cinder.pp @@ -169,20 +169,21 @@ class openstack_tasks::openstack_cinder::openstack_cinder { } class { 'cinder::api': - os_region_name => $region, - bind_host => $bind_host, - ratelimits => hiera('cinder_rate_limits'), - service_workers => $service_workers, - privileged_user => true, - os_privileged_user_password => $cinder_user_password, - os_privileged_user_tenant => $keystone_tenant, - os_privileged_user_auth_url => $privileged_auth_uri, - os_privileged_user_name => $keystone_user, - keymgr_encryption_auth_url => $keymgr_encryption_auth_url, - nova_catalog_admin_info => 'compute:nova:adminURL', - nova_catalog_info => 'compute:nova:internalURL', - sync_db => $primary_controller, - default_volume_type => $default_volume_type, + os_region_name => $region, + bind_host => $bind_host, + ratelimits => hiera('cinder_rate_limits'), + service_workers => $service_workers, + privileged_user => true, + os_privileged_user_password => $cinder_user_password, + os_privileged_user_tenant => $keystone_tenant, + os_privileged_user_auth_url => $privileged_auth_uri, + os_privileged_user_name => $keystone_user, + keymgr_encryption_auth_url => $keymgr_encryption_auth_url, + nova_catalog_admin_info => 'compute:nova:adminURL', + nova_catalog_info => 'compute:nova:internalURL', + sync_db => $primary_controller, + default_volume_type => $default_volume_type, + enable_proxy_headers_parsing => true, } class { 'cinder::scheduler': } diff --git a/tests/noop/spec/hosts/openstack-cinder/openstack-cinder_spec.rb b/tests/noop/spec/hosts/openstack-cinder/openstack-cinder_spec.rb index cbafa0ab7c..29bb7d8261 100644 --- a/tests/noop/spec/hosts/openstack-cinder/openstack-cinder_spec.rb +++ b/tests/noop/spec/hosts/openstack-cinder/openstack-cinder_spec.rb @@ -110,7 +110,8 @@ describe manifest do let(:default_volume_type) { Noop.puppet_function 'pick', cinder_hash['default_volume_type'], facts[:os_service_default] } it { should contain_class('cinder::api').with( - 'default_volume_type' => default_volume_type, + 'default_volume_type' => default_volume_type, + 'enable_proxy_headers_parsing' => true, )} it 'should declare ::cinder class with correct database_max_* parameters' do