From 0e6fd040e51dec569ff64078109de2248b49b0ed Mon Sep 17 00:00:00 2001 From: Takashi Kajinami Date: Wed, 22 Jun 2022 14:23:44 +0900 Subject: [PATCH] Deprecate support for [glance_store] filesystem_store_* options ... because these options are used only when legacy store is used, which has been deprecated in favor of multi store. Change-Id: Ib5cef2869b241d26bbe2fc0a71b05942e03fe512 --- manifests/api.pp | 36 +++++++++++-------- ..._store-fs-store-opts-6215c0af739558be.yaml | 9 +++++ 2 files changed, 31 insertions(+), 14 deletions(-) create mode 100644 releasenotes/notes/deprecate-glance_store-fs-store-opts-6215c0af739558be.yaml diff --git a/manifests/api.pp b/manifests/api.pp index a8796f15..fb34eb6b 100644 --- a/manifests/api.pp +++ b/manifests/api.pp @@ -87,16 +87,6 @@ # (optional) Expose image location to trusted clients. # Defaults to $::os_service_default. # -# [*filesystem_store_metadata_file*] -# (optional) The path to a file which contains the metadata to be returned -# with any location associated with the filesystem store -# properties. -# Defaults to $::os_service_default. -# -# [*filesystem_store_file_perm*] -# (optional) File access permissions for the image files. -# Defaults to $::os_service_default. -# # [*location_strategy*] # (optional) Strategy used to determine the image location order. # Defaults to $::os_service_default. @@ -288,6 +278,16 @@ # (optional) CA certificate file to use to verify connecting clients # Defaults to undef # +# [*filesystem_store_metadata_file*] +# (optional) The path to a file which contains the metadata to be returned +# with any location associated with the filesystem store +# properties. +# Defaults to undef +# +# [*filesystem_store_file_perm*] +# (optional) File access permissions for the image files. +# Defaults to undef +# class glance::api( $package_ensure = 'present', $bind_host = $::os_service_default, @@ -300,8 +300,6 @@ class glance::api( $manage_service = true, $enabled = true, $show_image_direct_url = $::os_service_default, - $filesystem_store_metadata_file = $::os_service_default, - $filesystem_store_file_perm = $::os_service_default, $location_strategy = $::os_service_default, $purge_config = false, $enforce_secure_rbac = $::os_service_default, @@ -353,6 +351,8 @@ class glance::api( $cert_file = undef, $key_file = undef, $ca_file = undef, + $filesystem_store_metadata_file = undef, + $filesystem_store_file_perm = undef, ) inherits glance { include glance::deps @@ -385,6 +385,12 @@ glance::backend::multistore::cinder::cinder_os_region_name instead.') } } + ['filesystem_store_metadata_file', 'filesystem_store_file_perm'].each |String $fs_opt| { + if getvar($fs_opt) != undef { + warning("The ${fs_opt} parameter has been deprecated and will be removed.") + } + } + if $sync_db { include glance::db::sync include glance::db::metadefs @@ -532,8 +538,10 @@ enabled_backends instead.') } glance_api_config { - 'glance_store/filesystem_store_metadata_file': value => $filesystem_store_metadata_file; - 'glance_store/filesystem_store_file_perm': value => $filesystem_store_file_perm; + 'glance_store/filesystem_store_metadata_file': + value => pick($filesystem_store_metadata_file, $::os_service_default); + 'glance_store/filesystem_store_file_perm': + value => pick($filesystem_store_file_perm, $::os_service_default); } glance_api_config { diff --git a/releasenotes/notes/deprecate-glance_store-fs-store-opts-6215c0af739558be.yaml b/releasenotes/notes/deprecate-glance_store-fs-store-opts-6215c0af739558be.yaml new file mode 100644 index 00000000..a21a67ec --- /dev/null +++ b/releasenotes/notes/deprecate-glance_store-fs-store-opts-6215c0af739558be.yaml @@ -0,0 +1,9 @@ +--- +features: + - | + The following parameters of the ``glance::api`` class have been deprecated + and will be removed in a future release. These parameters are not used + when multistore is enabled. + + - ``filesystem_store_metadata_file`` + - ``filesystem_store_file_perm``