Add local_metadata_per_cell option
Indicates that the nova-metadata API service has been deployed per-cell, so that we can have better performance and data isolation in a multi-cell deployment. Users should consider the use of this configuration depending on how neutron is setup. If networks span cells, you might need to run nova-metadata API service globally. If your networks are segmented along cell boundaries, then you can run nova-metadata API service per cell. When running nova-metadata API service per cell, you should also configure each Neutron metadata-agent to point to the corresponding nova-metadata API service. Related-Bug: #1823760 Change-Id: Ia4dc22b2d013e00629f5945b230ab57a3e3a6465
This commit is contained in:
@@ -21,6 +21,18 @@
|
|||||||
# (optional) This option is the time (in seconds) to cache metadata.
|
# (optional) This option is the time (in seconds) to cache metadata.
|
||||||
# Defaults to $::os_service_default
|
# Defaults to $::os_service_default
|
||||||
#
|
#
|
||||||
|
# [*local_metadata_per_cell*]
|
||||||
|
# (optional) Indicates that the nova-metadata API service has been deployed
|
||||||
|
# per-cell, so that we can have better performance and data isolation in a
|
||||||
|
# multi-cell deployment. Users should consider the use of this configuration
|
||||||
|
# depending on how neutron is setup. If networks span cells, you might need
|
||||||
|
# to run nova-metadata API service globally. If your networks are segmented
|
||||||
|
# along cell boundaries, then you can run nova-metadata API service per cell.
|
||||||
|
# When running nova-metadata API service per cell, you should also configure
|
||||||
|
# each Neutron metadata-agent to point to the corresponding nova-metadata API
|
||||||
|
# service.
|
||||||
|
# Defaults to $::os_service_default
|
||||||
|
#
|
||||||
# DEPRECATED
|
# DEPRECATED
|
||||||
#
|
#
|
||||||
# [*vendordata_jsonfile_path*]
|
# [*vendordata_jsonfile_path*]
|
||||||
@@ -94,6 +106,7 @@ class nova::metadata(
|
|||||||
$neutron_metadata_proxy_shared_secret = undef,
|
$neutron_metadata_proxy_shared_secret = undef,
|
||||||
$enable_proxy_headers_parsing = $::os_service_default,
|
$enable_proxy_headers_parsing = $::os_service_default,
|
||||||
$metadata_cache_expiration = $::os_service_default,
|
$metadata_cache_expiration = $::os_service_default,
|
||||||
|
$local_metadata_per_cell = $::os_service_default,
|
||||||
# DEPRECATED PARAMETERS
|
# DEPRECATED PARAMETERS
|
||||||
$vendordata_jsonfile_path = undef,
|
$vendordata_jsonfile_path = undef,
|
||||||
$vendordata_providers = undef,
|
$vendordata_providers = undef,
|
||||||
@@ -138,6 +151,7 @@ class nova::metadata(
|
|||||||
nova_config {
|
nova_config {
|
||||||
'DEFAULT/enabled_apis': value => $enabled_apis;
|
'DEFAULT/enabled_apis': value => $enabled_apis;
|
||||||
'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;
|
||||||
}
|
}
|
||||||
|
|
||||||
oslo::middleware {'nova_config':
|
oslo::middleware {'nova_config':
|
||||||
|
|||||||
@@ -0,0 +1,12 @@
|
|||||||
|
---
|
||||||
|
features:
|
||||||
|
- |
|
||||||
|
Indicates that the nova-metadata API service has been deployed
|
||||||
|
per-cell, so that we can have better performance and data isolation in a
|
||||||
|
multi-cell deployment. Users should consider the use of this configuration
|
||||||
|
depending on how neutron is setup. If networks span cells, you might need
|
||||||
|
to run nova-metadata API service globally. If your networks are segmented
|
||||||
|
along cell boundaries, then you can run nova-metadata API service per cell.
|
||||||
|
When running nova-metadata API service per cell, you should also configure
|
||||||
|
each Neutron metadata-agent to point to the corresponding nova-metadata API
|
||||||
|
service.
|
||||||
@@ -26,6 +26,7 @@ describe 'nova::metadata' do
|
|||||||
:enable_proxy_headers_parsing => '<SERVICE DEFAULT>',
|
:enable_proxy_headers_parsing => '<SERVICE DEFAULT>',
|
||||||
)
|
)
|
||||||
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>')
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'unconfigures neutron_metadata proxy' do
|
it 'unconfigures neutron_metadata proxy' do
|
||||||
@@ -39,6 +40,7 @@ describe 'nova::metadata' do
|
|||||||
params.merge!({
|
params.merge!({
|
||||||
:neutron_metadata_proxy_shared_secret => 'secrete',
|
:neutron_metadata_proxy_shared_secret => 'secrete',
|
||||||
:enable_proxy_headers_parsing => true,
|
:enable_proxy_headers_parsing => true,
|
||||||
|
:local_metadata_per_cell => true,
|
||||||
:metadata_cache_expiration => 15,
|
:metadata_cache_expiration => 15,
|
||||||
:vendordata_jsonfile_path => '/tmp',
|
:vendordata_jsonfile_path => '/tmp',
|
||||||
:vendordata_providers => ['StaticJSON', 'DynamicJSON'],
|
:vendordata_providers => ['StaticJSON', 'DynamicJSON'],
|
||||||
@@ -58,6 +60,7 @@ describe 'nova::metadata' do
|
|||||||
end
|
end
|
||||||
|
|
||||||
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/metadata_cache_expiration').with('value' => '15')
|
is_expected.to contain_nova_config('api/metadata_cache_expiration').with('value' => '15')
|
||||||
is_expected.to contain_nova_config('api/vendordata_jsonfile_path').with('value' => '/tmp')
|
is_expected.to contain_nova_config('api/vendordata_jsonfile_path').with('value' => '/tmp')
|
||||||
is_expected.to contain_nova_config('api/vendordata_providers').with('value' => 'StaticJSON,DynamicJSON')
|
is_expected.to contain_nova_config('api/vendordata_providers').with('value' => 'StaticJSON,DynamicJSON')
|
||||||
|
|||||||
Reference in New Issue
Block a user