From 26e26d115d04f6208f316932f18a9b57bde4867d Mon Sep 17 00:00:00 2001 From: Takashi Kajinami Date: Tue, 22 Dec 2020 01:10:39 +0900 Subject: [PATCH] Use glance-swift.conf by default This patch changes default of the swift_store_config_file parameter, so that the configuration file generated by puppet-glance is used by default, instead of requiring users to set the parameter explicitly. Closes-Bug: #1908917 Change-Id: I4ac04a561746c227b245d11890d02c14a21965d0 --- manifests/backend/multistore/swift.pp | 4 ++-- ...efault-of-swift_store_config_file-e59ff9753f3612a7.yaml | 7 +++++++ spec/defines/glance_backend_multistore_swift_spec.rb | 6 +++--- 3 files changed, 12 insertions(+), 5 deletions(-) create mode 100644 releasenotes/notes/change-default-of-swift_store_config_file-e59ff9753f3612a7.yaml diff --git a/manifests/backend/multistore/swift.pp b/manifests/backend/multistore/swift.pp index 0e2b226f..7f48f78e 100644 --- a/manifests/backend/multistore/swift.pp +++ b/manifests/backend/multistore/swift.pp @@ -62,7 +62,7 @@ # Optional. Default: $::os_service_default. # # [*swift_store_config_file*] -# Optional. Default: $::os_service_default. +# Optional. Default: '/etc/glance/glance-swift.conf' # # [*default_swift_reference*] # Optional. The reference to the default swift @@ -94,7 +94,7 @@ define glance::backend::multistore::swift( $swift_store_create_container_on_put = $::os_service_default, $swift_store_endpoint_type = 'internalURL', $swift_store_region = $::os_service_default, - $swift_store_config_file = $::os_service_default, + $swift_store_config_file = '/etc/glance/glance-swift.conf', $default_swift_reference = 'ref1', $swift_buffer_on_upload = $::os_service_default, $swift_upload_buffer_dir = $::os_service_default, diff --git a/releasenotes/notes/change-default-of-swift_store_config_file-e59ff9753f3612a7.yaml b/releasenotes/notes/change-default-of-swift_store_config_file-e59ff9753f3612a7.yaml new file mode 100644 index 00000000..e194f328 --- /dev/null +++ b/releasenotes/notes/change-default-of-swift_store_config_file-e59ff9753f3612a7.yaml @@ -0,0 +1,7 @@ +--- +fixes: + - | + The ``swift::backend::multistore::swift::swift_store_config_file`` is + now set to ``/etc/glance/glance-swift.conf`` by default. Because of this + change the parameter is automatically set to use the configuration file + generated by puppet-glance. diff --git a/spec/defines/glance_backend_multistore_swift_spec.rb b/spec/defines/glance_backend_multistore_swift_spec.rb index d1d8e6cb..ba4a2367 100644 --- a/spec/defines/glance_backend_multistore_swift_spec.rb +++ b/spec/defines/glance_backend_multistore_swift_spec.rb @@ -46,7 +46,7 @@ describe 'glance::backend::multistore::swift' do is_expected.to contain_glance_api_config('swift/swift_store_create_container_on_put').with_value('') is_expected.to contain_glance_api_config('swift/swift_store_endpoint_type').with_value('internalURL') is_expected.to contain_glance_api_config('swift/swift_store_region').with_value('') - is_expected.to contain_glance_api_config('swift/swift_store_config_file').with_value('') + is_expected.to contain_glance_api_config('swift/swift_store_config_file').with_value('/etc/glance/glance-swift.conf') is_expected.to contain_glance_api_config('swift/default_swift_reference').with_value('ref1') is_expected.to contain_glance_api_config('swift/swift_buffer_on_upload').with_value('') is_expected.to contain_glance_api_config('swift/swift_upload_buffer_dir').with_value('') @@ -75,7 +75,7 @@ describe 'glance::backend::multistore::swift' do :swift_store_create_container_on_put => true, :swift_store_endpoint_type => 'publicURL', :swift_store_region => 'RegionTwo', - :swift_store_config_file => '/etc/glance/glance-swift.conf', + :swift_store_config_file => '/etc/glance/glance-swift2.conf', :default_swift_reference => 'swift_creds', :swift_buffer_on_upload => true, :swift_upload_buffer_dir => '/var/glance/swift', @@ -90,7 +90,7 @@ describe 'glance::backend::multistore::swift' do is_expected.to contain_glance_api_config('swift/swift_store_large_object_chunk_size').with_value('50') is_expected.to contain_glance_api_config('swift/swift_store_endpoint_type').with_value('publicURL') is_expected.to contain_glance_api_config('swift/swift_store_region').with_value('RegionTwo') - is_expected.to contain_glance_api_config('swift/swift_store_config_file').with_value('/etc/glance/glance-swift.conf') + is_expected.to contain_glance_api_config('swift/swift_store_config_file').with_value('/etc/glance/glance-swift2.conf') is_expected.to contain_glance_api_config('swift/default_swift_reference').with_value('swift_creds') is_expected.to contain_glance_api_config('swift/swift_buffer_on_upload').with_value(true) is_expected.to contain_glance_api_config('swift/swift_upload_buffer_dir').with_value('/var/glance/swift')