Require boolean value for use_simple_tenant_usage

The OPENSTACK_USE_SIMPLE_TENANT_USAGE option in horizon expects only
boolean values and using a different type can result in unexpected
result.

This enforces the correct value type to ensure we accept only boolean
to avoid such problems.

Change-Id: Ib3735d354f658dee64a7fd01e609a11d174dbf8d
This commit is contained in:
Takashi Kajinami 2023-08-23 10:59:32 +09:00
parent 04fbdf4759
commit 54a31c91fd
3 changed files with 8 additions and 3 deletions

View File

@ -619,7 +619,7 @@ class horizon(
Hash $keystone_options = {},
Hash $neutron_options = {},
Hash $instance_options = {},
$use_simple_tenant_usage = undef,
Boolean $use_simple_tenant_usage = false,
Stdlib::Absolutepath $file_upload_temp_dir = '/tmp',
Optional[Stdlib::Absolutepath] $policy_files_path = undef,
Optional[Hash[String, String]] $policy_files = undef,

View File

@ -0,0 +1,5 @@
---
upgrade:
- |
The ``horizon::use_simple_tenant_usage`` parameter now requires a boolean
value.

View File

@ -429,8 +429,8 @@ OPENSTACK_ENABLE_PASSWORD_RETRIEVE = True
# SimpleTenantUsage can cause performance issues in the nova API in larger
# deployments. Try to set this to ``False`` for such cases.
#OPENSTACK_USE_SIMPLE_TENANT_USAGE = True
<% if ! (@use_simple_tenant_usage.nil?) -%>
OPENSTACK_USE_SIMPLE_TENANT_USAGE = <%= @use_simple_tenant_usage.to_s.capitalize %>
<% if ! @use_simple_tenant_usage -%>
OPENSTACK_USE_SIMPLE_TENANT_USAGE = False
<% end -%>
# The Xen Hypervisor has the ability to set the mount point for volumes