Fix incomplete backport of e8b24805d6
The change7301812c9e
was supposed to be a backport ofe8b24805d6
but in fact it was incomplete and didn't have required changes in the nova::metadata class. This change implements the missing part to backport the change completely. Change-Id: Ie9620ddecc1ded6659b75be6acfd7de125c9b8ba
This commit is contained in:
parent
4c10e4343f
commit
98e7b687dd
|
@ -24,11 +24,11 @@
|
||||||
# service.
|
# service.
|
||||||
# Defaults to $::os_service_default
|
# Defaults to $::os_service_default
|
||||||
#
|
#
|
||||||
# DEPRECATED
|
|
||||||
#
|
|
||||||
# [*dhcp_domain*]
|
# [*dhcp_domain*]
|
||||||
# (optional) domain to use for building the hostnames
|
# (optional) domain to use for building the hostnames
|
||||||
# Defaults to undef.
|
# Defaults to $::os_service_default
|
||||||
|
#
|
||||||
|
# DEPRECATED
|
||||||
#
|
#
|
||||||
# [*enabled_apis*]
|
# [*enabled_apis*]
|
||||||
# (optional) A list of apis to enable
|
# (optional) A list of apis to enable
|
||||||
|
@ -47,8 +47,8 @@ class nova::metadata(
|
||||||
$neutron_metadata_proxy_shared_secret = undef,
|
$neutron_metadata_proxy_shared_secret = undef,
|
||||||
$metadata_cache_expiration = $::os_service_default,
|
$metadata_cache_expiration = $::os_service_default,
|
||||||
$local_metadata_per_cell = $::os_service_default,
|
$local_metadata_per_cell = $::os_service_default,
|
||||||
|
$dhcp_domain = $::os_service_default,
|
||||||
# DEPRECATED PARAMETERS
|
# DEPRECATED PARAMETERS
|
||||||
$dhcp_domain = undef,
|
|
||||||
$enabled_apis = undef,
|
$enabled_apis = undef,
|
||||||
$enable_proxy_headers_parsing = undef,
|
$enable_proxy_headers_parsing = undef,
|
||||||
$max_request_body_size = undef,
|
$max_request_body_size = undef,
|
||||||
|
@ -70,11 +70,9 @@ and will be removed in the future. Please use the one ::nova::api.')
|
||||||
warning('max_request_body_size in ::nova::metadata is deprecated, has no effect \
|
warning('max_request_body_size in ::nova::metadata is deprecated, has no effect \
|
||||||
and will be removed in the future. Please use the one ::nova::api.')
|
and will be removed in the future. Please use the one ::nova::api.')
|
||||||
}
|
}
|
||||||
if $dhcp_domain {
|
|
||||||
warning('dhcp_domain in nova::metadata is deprecated, use nova::dhcp_domain instead.')
|
|
||||||
}
|
|
||||||
|
|
||||||
nova_config {
|
nova_config {
|
||||||
|
'api/dhcp_domain': value => $dhcp_domain;
|
||||||
'api/metadata_cache_expiration': value => $metadata_cache_expiration;
|
'api/metadata_cache_expiration': value => $metadata_cache_expiration;
|
||||||
'api/local_metadata_per_cell': value => $local_metadata_per_cell;
|
'api/local_metadata_per_cell': value => $local_metadata_per_cell;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,8 +0,0 @@
|
||||||
---
|
|
||||||
fixes:
|
|
||||||
- |
|
|
||||||
The nova::metadata::dhcp_domain paramater has been deprecated by
|
|
||||||
nova::dhcp_domain as the nova config option is also required for
|
|
||||||
nova-compute.
|
|
||||||
[Bug `1903908 <https://bugs.launchpad.net/nova/+bug/1903908>`_]
|
|
||||||
|
|
|
@ -22,7 +22,7 @@ describe 'nova::metadata' do
|
||||||
it 'configures various stuff' do
|
it 'configures various stuff' do
|
||||||
is_expected.to contain_nova_config('api/metadata_cache_expiration').with('value' => '<SERVICE DEFAULT>')
|
is_expected.to contain_nova_config('api/metadata_cache_expiration').with('value' => '<SERVICE DEFAULT>')
|
||||||
is_expected.to contain_nova_config('api/local_metadata_per_cell').with('value' => '<SERVICE DEFAULT>')
|
is_expected.to contain_nova_config('api/local_metadata_per_cell').with('value' => '<SERVICE DEFAULT>')
|
||||||
is_expected.to_not contain_nova_config('api/dhcp_domain')
|
is_expected.to contain_nova_config('api/dhcp_domain').with('value' => '<SERVICE DEFAULT>')
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'unconfigures neutron_metadata proxy' do
|
it 'unconfigures neutron_metadata proxy' do
|
||||||
|
@ -44,7 +44,7 @@ describe 'nova::metadata' do
|
||||||
it 'configures various stuff' do
|
it 'configures various stuff' do
|
||||||
is_expected.to contain_nova_config('api/local_metadata_per_cell').with('value' => true)
|
is_expected.to contain_nova_config('api/local_metadata_per_cell').with('value' => true)
|
||||||
is_expected.to contain_nova_config('api/metadata_cache_expiration').with('value' => '15')
|
is_expected.to contain_nova_config('api/metadata_cache_expiration').with('value' => '15')
|
||||||
is_expected.to_not contain_nova_config('api/dhcp_domain')
|
is_expected.to contain_nova_config('api/dhcp_domain').with('value' => 'foo')
|
||||||
is_expected.to contain_nova_config('neutron/service_metadata_proxy').with('value' => true)
|
is_expected.to contain_nova_config('neutron/service_metadata_proxy').with('value' => true)
|
||||||
is_expected.to contain_nova_config('neutron/metadata_proxy_shared_secret').with('value' => 'secrete').with_secret(true)
|
is_expected.to contain_nova_config('neutron/metadata_proxy_shared_secret').with('value' => 'secrete').with_secret(true)
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue