Migrate max_stacks_per_tenant to heat::engine
... because the max_stacks_per_tenant parameter is used by heat-engine, and the very similar max_resources_per_stack parameter is implemented in heat::engine. Change-Id: I57a8e8b9643d999c8ed379895f998ee1d09fb1a8
This commit is contained in:
parent
4185722bf7
commit
e79e74cd08
|
@ -88,6 +88,11 @@
|
||||||
# (Optional) Instance connection to CFN/CW API validate certs if SSL is used.
|
# (Optional) Instance connection to CFN/CW API validate certs if SSL is used.
|
||||||
# Defaults to $::os_service_default
|
# Defaults to $::os_service_default
|
||||||
#
|
#
|
||||||
|
# [*max_stacks_per_tenant*]
|
||||||
|
# (optional) Maximum number of stacks any one tenant may have active at one
|
||||||
|
# time.
|
||||||
|
# Defaults to $::os_service_default.
|
||||||
|
#
|
||||||
# [*max_resources_per_stack*]
|
# [*max_resources_per_stack*]
|
||||||
# (Optional) Maximum resources allowed per top-level stack.
|
# (Optional) Maximum resources allowed per top-level stack.
|
||||||
# Defaults to $::os_service_default
|
# Defaults to $::os_service_default
|
||||||
|
@ -151,6 +156,7 @@ class heat::engine (
|
||||||
$trusts_delegated_roles = $::os_service_default,
|
$trusts_delegated_roles = $::os_service_default,
|
||||||
$instance_connection_is_secure = $::os_service_default,
|
$instance_connection_is_secure = $::os_service_default,
|
||||||
$instance_connection_https_validate_certificates = $::os_service_default,
|
$instance_connection_https_validate_certificates = $::os_service_default,
|
||||||
|
$max_stacks_per_tenant = $::os_service_default,
|
||||||
$max_resources_per_stack = $::os_service_default,
|
$max_resources_per_stack = $::os_service_default,
|
||||||
$num_engine_workers = $::os_workers_heat_engine,
|
$num_engine_workers = $::os_workers_heat_engine,
|
||||||
$convergence_engine = $::os_service_default,
|
$convergence_engine = $::os_service_default,
|
||||||
|
@ -214,6 +220,8 @@ class heat::engine (
|
||||||
tag => 'heat-service',
|
tag => 'heat-service',
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$max_stacks_per_tenant_real = pick($::heat::max_stacks_per_tenant, $max_stacks_per_tenant)
|
||||||
|
|
||||||
heat_config {
|
heat_config {
|
||||||
'DEFAULT/auth_encryption_key': value => $auth_encryption_key, secret => true;
|
'DEFAULT/auth_encryption_key': value => $auth_encryption_key, secret => true;
|
||||||
'DEFAULT/heat_stack_user_role': value => $heat_stack_user_role;
|
'DEFAULT/heat_stack_user_role': value => $heat_stack_user_role;
|
||||||
|
@ -224,6 +232,7 @@ class heat::engine (
|
||||||
'DEFAULT/default_deployment_signal_transport': value => $default_deployment_signal_transport;
|
'DEFAULT/default_deployment_signal_transport': value => $default_deployment_signal_transport;
|
||||||
'DEFAULT/default_user_data_format': value => $default_user_data_format;
|
'DEFAULT/default_user_data_format': value => $default_user_data_format;
|
||||||
'DEFAULT/trusts_delegated_roles': value => $trusts_delegated_roles;
|
'DEFAULT/trusts_delegated_roles': value => $trusts_delegated_roles;
|
||||||
|
'DEFAULT/max_stacks_per_tenant': value => $max_stacks_per_tenant_real;
|
||||||
'DEFAULT/max_resources_per_stack': value => $max_resources_per_stack;
|
'DEFAULT/max_resources_per_stack': value => $max_resources_per_stack;
|
||||||
'DEFAULT/instance_connection_https_validate_certificates': value => $instance_connection_https_validate_certificates;
|
'DEFAULT/instance_connection_https_validate_certificates': value => $instance_connection_https_validate_certificates;
|
||||||
'DEFAULT/instance_connection_is_secure': value => $instance_connection_is_secure;
|
'DEFAULT/instance_connection_is_secure': value => $instance_connection_is_secure;
|
||||||
|
|
|
@ -249,11 +249,6 @@
|
||||||
# take for evaluation.
|
# take for evaluation.
|
||||||
# Defaults to $::os_service_default.
|
# Defaults to $::os_service_default.
|
||||||
#
|
#
|
||||||
# [*max_stacks_per_tenant*]
|
|
||||||
# (optional) Maximum number of stacks any one tenant may have active at one
|
|
||||||
# time.
|
|
||||||
# Defaults to $::os_service_default.
|
|
||||||
#
|
|
||||||
# DEPRECATED PARAMETERS
|
# DEPRECATED PARAMETERS
|
||||||
#
|
#
|
||||||
# [*database_min_pool_size*]
|
# [*database_min_pool_size*]
|
||||||
|
@ -288,6 +283,11 @@
|
||||||
# (Optional) Accept clients using either SSL or plain TCP
|
# (Optional) Accept clients using either SSL or plain TCP
|
||||||
# Defaults to undef.
|
# Defaults to undef.
|
||||||
#
|
#
|
||||||
|
# [*max_stacks_per_tenant*]
|
||||||
|
# (optional) Maximum number of stacks any one tenant may have active at one
|
||||||
|
# time.
|
||||||
|
# Defaults to undef
|
||||||
|
#
|
||||||
class heat(
|
class heat(
|
||||||
$package_ensure = 'present',
|
$package_ensure = 'present',
|
||||||
$keystone_ec2_uri = $::os_service_default,
|
$keystone_ec2_uri = $::os_service_default,
|
||||||
|
@ -340,7 +340,6 @@ class heat(
|
||||||
$auth_strategy = 'keystone',
|
$auth_strategy = 'keystone',
|
||||||
$yaql_memory_quota = $::os_service_default,
|
$yaql_memory_quota = $::os_service_default,
|
||||||
$yaql_limit_iterators = $::os_service_default,
|
$yaql_limit_iterators = $::os_service_default,
|
||||||
$max_stacks_per_tenant = $::os_service_default,
|
|
||||||
# DEPRECATED PARAMETERS
|
# DEPRECATED PARAMETERS
|
||||||
$database_min_pool_size = undef,
|
$database_min_pool_size = undef,
|
||||||
$database_connection = undef,
|
$database_connection = undef,
|
||||||
|
@ -351,6 +350,7 @@ class heat(
|
||||||
$database_max_overflow = undef,
|
$database_max_overflow = undef,
|
||||||
$sync_db = undef,
|
$sync_db = undef,
|
||||||
$amqp_allow_insecure_clients = undef,
|
$amqp_allow_insecure_clients = undef,
|
||||||
|
$max_stacks_per_tenant = undef,
|
||||||
) {
|
) {
|
||||||
|
|
||||||
include heat::db
|
include heat::db
|
||||||
|
@ -398,6 +398,12 @@ removed in a future realse. Use heat::db::database_max_overflow instead')
|
||||||
in a future release. Use heat::db::sync_db instead')
|
in a future release. Use heat::db::sync_db instead')
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if $max_stacks_per_tenant != undef {
|
||||||
|
warning('The max_stacks_per_tenant parameter is deprecated. \
|
||||||
|
Use heat::engine::max_stacks_per_tenant instead.')
|
||||||
|
include heat::engine
|
||||||
|
}
|
||||||
|
|
||||||
if $auth_strategy == 'keystone' {
|
if $auth_strategy == 'keystone' {
|
||||||
include heat::keystone::authtoken
|
include heat::keystone::authtoken
|
||||||
}
|
}
|
||||||
|
@ -479,7 +485,6 @@ in a future release. Use heat::db::sync_db instead')
|
||||||
'DEFAULT/region_name_for_services': value => $region_name;
|
'DEFAULT/region_name_for_services': value => $region_name;
|
||||||
'DEFAULT/enable_stack_abandon': value => $enable_stack_abandon;
|
'DEFAULT/enable_stack_abandon': value => $enable_stack_abandon;
|
||||||
'DEFAULT/enable_stack_adopt': value => $enable_stack_adopt;
|
'DEFAULT/enable_stack_adopt': value => $enable_stack_adopt;
|
||||||
'DEFAULT/max_stacks_per_tenant': value => $max_stacks_per_tenant;
|
|
||||||
'ec2authtoken/auth_uri': value => $keystone_ec2_uri;
|
'ec2authtoken/auth_uri': value => $keystone_ec2_uri;
|
||||||
'paste_deploy/flavor': value => $flavor;
|
'paste_deploy/flavor': value => $flavor;
|
||||||
'yaql/limit_iterators': value => $yaql_limit_iterators;
|
'yaql/limit_iterators': value => $yaql_limit_iterators;
|
||||||
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
---
|
||||||
|
features:
|
||||||
|
- |
|
||||||
|
The ``heat::max_stacks_per_tenant`` parameter has been deprecated in favor
|
||||||
|
of the new ``heat::engine::max_stacks_per_tenant`` parameter.
|
|
@ -91,6 +91,7 @@ describe 'heat::engine' do
|
||||||
it { is_expected.to contain_heat_config('DEFAULT/default_user_data_format').with_value( expected_params[:default_user_data_format] ) }
|
it { is_expected.to contain_heat_config('DEFAULT/default_user_data_format').with_value( expected_params[:default_user_data_format] ) }
|
||||||
it { is_expected.to contain_heat_config('DEFAULT/instance_connection_is_secure').with_value('<SERVICE DEFAULT>') }
|
it { is_expected.to contain_heat_config('DEFAULT/instance_connection_is_secure').with_value('<SERVICE DEFAULT>') }
|
||||||
it { is_expected.to contain_heat_config('DEFAULT/instance_connection_https_validate_certificates').with_value('<SERVICE DEFAULT>') }
|
it { is_expected.to contain_heat_config('DEFAULT/instance_connection_https_validate_certificates').with_value('<SERVICE DEFAULT>') }
|
||||||
|
it { is_expected.to contain_heat_config('DEFAULT/max_stacks_per_tenant').with_value('<SERVICE DEFAULT>') }
|
||||||
it { is_expected.to contain_heat_config('DEFAULT/max_resources_per_stack').with_value('<SERVICE DEFAULT>') }
|
it { is_expected.to contain_heat_config('DEFAULT/max_resources_per_stack').with_value('<SERVICE DEFAULT>') }
|
||||||
it { is_expected.to contain_heat_config('DEFAULT/num_engine_workers').with_value( expected_params[:num_engine_workers] ) }
|
it { is_expected.to contain_heat_config('DEFAULT/num_engine_workers').with_value( expected_params[:num_engine_workers] ) }
|
||||||
it { is_expected.to contain_heat_config('DEFAULT/convergence_engine').with_value( expected_params[:convergence_engine] ) }
|
it { is_expected.to contain_heat_config('DEFAULT/convergence_engine').with_value( expected_params[:convergence_engine] ) }
|
||||||
|
@ -102,6 +103,17 @@ describe 'heat::engine' do
|
||||||
it { is_expected.to contain_heat_config('DEFAULT/server_keystone_endpoint_type').with_value( expected_params[:server_keystone_endpoint_type] ) }
|
it { is_expected.to contain_heat_config('DEFAULT/server_keystone_endpoint_type').with_value( expected_params[:server_keystone_endpoint_type] ) }
|
||||||
end
|
end
|
||||||
|
|
||||||
|
context 'with max limits are defined' do
|
||||||
|
before do
|
||||||
|
params.merge!({
|
||||||
|
:max_stacks_per_tenant => 512,
|
||||||
|
:max_resources_per_stack => 1000,
|
||||||
|
})
|
||||||
|
end
|
||||||
|
it { is_expected.to contain_heat_config('DEFAULT/max_stacks_per_tenant').with_value(512) }
|
||||||
|
it { is_expected.to contain_heat_config('DEFAULT/max_resources_per_stack').with_value(1000) }
|
||||||
|
end
|
||||||
|
|
||||||
context 'with disabled service managing' do
|
context 'with disabled service managing' do
|
||||||
before do
|
before do
|
||||||
params.merge!({
|
params.merge!({
|
||||||
|
|
|
@ -87,10 +87,6 @@ describe 'heat' do
|
||||||
is_expected.to contain_heat_config('DEFAULT/max_template_size').with_value('<SERVICE DEFAULT>')
|
is_expected.to contain_heat_config('DEFAULT/max_template_size').with_value('<SERVICE DEFAULT>')
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'configures max_stacks_per_tenant' do
|
|
||||||
is_expected.to contain_heat_config('DEFAULT/max_stacks_per_tenant').with_value('<SERVICE DEFAULT>')
|
|
||||||
end
|
|
||||||
|
|
||||||
it 'configures max_json_body_size' do
|
it 'configures max_json_body_size' do
|
||||||
is_expected.to contain_heat_config('DEFAULT/max_json_body_size').with_value('<SERVICE DEFAULT>')
|
is_expected.to contain_heat_config('DEFAULT/max_json_body_size').with_value('<SERVICE DEFAULT>')
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue