Fix the glance api version warning

The Images (Glance) v1 API is deprecated and will be removed on or
after the Pike release, following the standard OpenStack deprecation
policy. Currently, the solution is to set enable_v1_api=False in
glance-api.conf file[0]. And when enable_v1_api=False, the
enable_v1_registry should be False[1].

[0]: https://github.com/openstack/glance/blob/master/glance/common/config.py#L504
[1]: https://github.com/openstack/glance/blob/master/glance/common/config.py#L482

Change-Id: I4e69b21e59f5fe206e00859fcaa44547a72e3dfb
This commit is contained in:
ZhongShengping 2018-01-17 14:01:09 +08:00
parent 939a58346e
commit 40aab381fc
5 changed files with 12 additions and 6 deletions

View File

@ -236,7 +236,7 @@
# If you enable this option, you'll get a deprecation warning in Glance
# logs. If enable_v2_api is set to True, glance::registry::enable_v1_registry
# must be configured to True, since Registry is required in API v1.
# Defaults to $::os_service_default.
# Defaults to false.
#
# [*enable_v2_api*]
# (Optional) Enable or not Glance API v2.
@ -352,7 +352,7 @@ class glance::api(
$conversion_format = $::os_service_default,
$os_region_name = 'RegionOne',
$enable_proxy_headers_parsing = $::os_service_default,
$enable_v1_api = $::os_service_default,
$enable_v1_api = false,
$enable_v2_api = $::os_service_default,
$sync_db = true,
$validate = false,

View File

@ -119,7 +119,7 @@
# set to True.
# If your OpenStack deployment is only using Glance API v2, this option
# should be set to False.
# Defaults to $::os_service_default.
# Defaults to false.
#
# DEPRECATED PARAMETERS
#
@ -154,7 +154,7 @@ class glance::registry(
$key_file = $::os_service_default,
$ca_file = $::os_service_default,
$os_region_name = $::os_service_default,
$enable_v1_registry = $::os_service_default,
$enable_v1_registry = false,
# DEPRECATED
$sync_db = undef,
) inherits glance {

View File

@ -0,0 +1,6 @@
---
other:
- Change default value to false for enable_api_v1 in glance::api class.
Change default value to false for enable_registry_v1 in glance::registry class.
If enable_api_v1 and enable_registry_v1 options are set to $::os_service_default,
a warning will be sent.

View File

@ -43,7 +43,7 @@ describe 'glance::api' do
:taskflow_engine_mode => '<SERVICE DEFAULT>',
:taskflow_max_workers => '<SERVICE DEFAULT>',
:conversion_format => '<SERVICE DEFAULT>',
:enable_v1_api => '<SERVICE DEFAULT>',
:enable_v1_api => false,
:enable_v2_api => '<SERVICE DEFAULT>',
:sync_db => true,
:limit_param_default => '<SERVICE DEFAULT>',

View File

@ -24,7 +24,7 @@ describe 'glance::registry' do
:ca_file => '<SERVICE DEFAULT>',
:cert_file => '<SERVICE DEFAULT>',
:key_file => '<SERVICE DEFAULT>',
:enable_v1_registry => '<SERVICE DEFAULT>',
:enable_v1_registry => false,
}
end