Commit Graph

350 Commits

Author SHA1 Message Date
Zuul 49dd1e5ac4 Merge "Use explicit boolean rather than string representation" 2024-04-17 16:36:58 +00:00
Zuul a47980f00e Merge "Require valid type for available_themses" 2024-04-17 09:18:00 +00:00
Takashi Kajinami bc3c1e0d09 Use explicit boolean rather than string representation
... so that we can enforce Boolean input in the future.

Change-Id: I83422b3545a80cd6c76e1317771e3aad44dd978c
2024-04-17 10:52:03 +09:00
Zuul 94fa2b3ec6 Merge "Restart httpd after config change" 2024-01-12 17:53:04 +00:00
Takashi Kajinami 5a3245f9d4 Require valid type for available_themses
Currently, if a users gives invalid input type for available_themses,
the logic ignores the input and reflect nothing in the config file,
which can cause unexpected results. This ensures the given input is
a hash value.

This also adds validations to ensure only required values are included
by the hash.

Change-Id: I61aefe65e6218a79dce7a0633cb0ceb13b0021b4
2024-01-10 15:42:02 +00:00
Takashi Kajinami d8098793ea Restart httpd after config change
This fixes the missing notifications so that the httpd service is
properly restarted after config files are updated.

This also realigns package resources for separate dasobhards to
the global install phase because these packages should be installed
before config phase.

Related-Bug: #2048037
Change-Id: I8331c6c528391401c57b450be6bf75829179a9f8
2024-01-10 01:52:26 +09:00
Takashi Kajinami 748e615c78 Support COMPRESS_ENABLED
The COMPRESS_ENABLED option controls whether the compression should be
enabled. This adds support for this option.

Change-Id: Ie3e48afc50770b121daacb90d8c70cf241efd330
2023-12-14 11:36:39 +09:00
Zuul 035a17b444 Merge "Deprecate support of MemcachedCache backend" 2023-11-17 18:55:18 +00:00
Zuul 678f359196 Merge "Support purging local_settings.d" 2023-11-16 05:11:35 +00:00
Takashi Kajinami 567d97e1da Deprecate support of MemcachedCache backend
This backend was deprecated in django 3.2 and was removed in 4.1.

At the time of writing, all of the supported distributions provide
django 3.2 which contains the deprecation, so we can deprecate its
support now.

Change-Id: Ic0781aa5cd2100ded69ec262cffd834b0de86495
2023-11-16 03:24:15 +09:00
Zuul 2467a38063 Merge "Create dedicated class for ironic-ui" 2023-11-15 17:06:26 +00:00
Takashi Kajinami e1e446e689 Support purging local_settings.d
In Debian, some files are installed into local_settings.d by their
packages and these conflict with the options added to local_settings.
This introduces an option to purge the directory.

Change-Id: I7e074f78b15ab22d86d6a6a10f573cfc4052023a
2023-11-14 08:25:48 +00:00
Takashi Kajinami cfe50237b6 Debian: Fix wrong wsgi script path
The horizon package in Debian installs the wsgi.py file at a path
different from the other distros.

Closes-Bug: #2043371
Change-Id: Idb8550dd534cd2a1bb442cd2e2256f1a8fc8d89e
2023-11-14 17:25:25 +09:00
Takashi Kajinami 1219aab898 Create dedicated class for ironic-ui
The package name of ironic-ui in Ubnutu/Debian does not follow
the general naming rule and the existing horizon::dashboard can't be
used.

Closes-Bug: #2033929
Change-Id: I7703550897c6b31f2b45ffce75f0ab2bae7a4157
2023-11-14 00:09:12 +09:00
Thomas Goirand d94647073a Add TOTP support
Horizon recently introduced TOTP support. This introduces a few new
parameters to allow users to enable the feature.

Depends-on: https://review.opendev.org/c/openstack/horizon/+/885570
Change-Id: I0b8d86c292715ffbb6d75dadcda7b51b1c190641
2023-10-22 14:40:48 +00:00
Takashi Kajinami 793d25460e Ensure boolean values at horizon::wsgi::apache
We already added these validations to the horizon class, but having
the same in the underlying implementation allows us to ensure
the supported types are passed down.

Change-Id: I591f7ee273030f16184d8b53768b3594efc22e35
2023-09-20 01:24:45 +00:00
Zuul c4af4b3d35 Merge "CentOS: Skip redundant compress/cache clear" 2023-09-15 14:06:14 +00:00
Takashi Kajinami d967012a7a CentOS: Skip redundant compress/cache clear
The horizon package in RDO provides the systemd drop-in[1] to execute
these commands before starting the httpd service, so we don't have to
execute these explicitly.

[1] https://github.com/rdo-packages/horizon-distgit/blob/rpm-master/python-django-horizon-systemd.conf

Change-Id: Ifb5cb45ce848345a8ca865443040830325686043
2023-09-12 16:36:32 +09:00
Takashi Kajinami 173cd6b8c5 Align default SESSION_TIMEOUT with horizon's default
The SESSION_TIMEOUT parameter in horizon defaults to 3600. This updates
the default in our module to use the consistent default.

Change-Id: Icb609fad8ce95f867fe467064995e665e42f253c
2023-09-12 13:47:13 +09:00
Takashi Kajinami b9780547a9 Add support for TOKEN_TIMEOUT_MARGIN
Change-Id: Ia0ceb69a45680a29e7311da94676d026978c2caa
2023-09-12 13:46:06 +09:00
Takashi Kajinami 1ebf203d64 Do not restart services after policy file changes
The oslo.policy library has implementations to detect change in policy
rules and reload the new rules without service restart.

Change-Id: I87f25b0b760f326671caf9874bff806261139956
2023-09-11 12:37:38 +09:00
Zuul 632fb29a84 Merge "Fix wrong default value of use_simple_tenant_usage" 2023-09-05 15:54:58 +00:00
Zuul d85cc4230d Merge "Stop replacing a dict value" 2023-09-05 15:46:57 +00:00
Takashi Kajinami b9ddda15f4 Fix wrong default value of use_simple_tenant_usage
The actual option in horizon was set to True by default before [1] was
merged. This restores the old default value.

[1] 54a31c91fd

Change-Id: Iaa64ba9d475b0dbfcbd53af8b777ef94cae85c0b
2023-08-31 22:13:48 +09:00
Takashi Kajinami 19db7a0d2f Stop replacing a dict value
Currently we completely replace some dict values in local_settings but
this causes a few problems.

 - Some keys(eg OPENSTACK_HYPERVISOR_FEATURES['enable_quotas']) are
   missing from the default dict value, which overrides its default
   value (True) in Horizon

 - We have to maintain the default values defined in our manifest
   according to any update in Horizon side.

This updates the logic to override keys only when requested, so that
the configuration basically leverage the defaults defined in Horizon.

Change-Id: I0fa105e595ff053d389e75004638af5856dbb734
2023-08-31 15:13:12 +09:00
Zuul 3e4422f427 Merge "Remove hardcoded hypervisor_options values" 2023-08-30 04:11:59 +00:00
Tobias Urdin bec3f3a214 Remove hardcoded hypervisor_options values
The default value of can_set_mount_point
that we merge into the hypervisor_options
parameter is not the Horizon default.

This removes the defaults that sets the
can_set_mount_point to true by default when
Horizon has this as false by default, it's
also only really functional on a very specific
hypervisor.

This also removes the can_set_password config
that we set to False that already is the Horizon
default.

Change-Id: Iba05bce817da1c1bc51acb06b6bdc69beba2ea26
Signed-off-by: Tobias Urdin <tobias.urdin@binero.com>
2023-08-23 08:52:34 +02:00
Takashi Kajinami 54a31c91fd 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
2023-08-23 10:59:32 +09:00
Takashi Kajinami e095ca91f1 Remove horizon::images_panel
This parameter was deprecated during the previous cycle[1] because it
has had no effect.

[1] 4f3e975a9e

Change-Id: I5bb84e271c0191be809538331de703b47560ac4d
2023-07-21 17:27:06 +09:00
Zuul 19a6e5090d Merge "Add per module policy service refresh" 2023-06-26 05:03:59 +00:00
Tobias Urdin 7c0c3e4d45 Add per module policy service refresh
Updating the policies for this project should only
refresh the services that reads it.

Change-Id: I94e1120013aa6e15bbf3aa48a9c29d9943985440
2023-06-22 22:09:24 +00:00
Takashi Kajinami 6c3b9a2e2d Ensure absolute paths
A few parameters requires absolute paths because these are eventually
used as the path property of file resources.

Change-Id: Ie5bb8c4174f624813c376df80768213ebbff13b8
2023-06-21 18:09:46 +09:00
Takashi Kajinami 53bc36b448 Add a few more strict type validations
Some logics (especially ones in templates) require specific data types.
This adds a few more type validations to avoid users from passing
unexpected types of inputs.

Change-Id: I7f77203f3eb431e96fde1fdfae0f0c51b7a8aaed
2023-06-20 13:28:56 +09:00
Takashi Kajinami 658a12dda5 replace validate_legacy with proper data types
the validate_legacy function is marked for deprecation in
v9.0.0 from puppetlabs-stdlib.

Change-Id: I25ceb3215a4a198e7a8545eeec6f2eeeafbd81c2
2023-06-20 13:28:49 +09:00
Takashi Kajinami fae7d47b1b Revert "Replace Stdlib::Absolutepath by Stdlib::Compat::Absolute_path"
This reverts commit 92950a690d.

Reason for revert:
Stdlib::Absolutepath has never been deprecated, but
Stdlib::Compat::Absolute_path was deprecated. The latest stdlib
removed all Stdlib::Compat::* types[1].

[1] fcbd4267fd

Change-Id: I40cbb3d514081520ea01f42b3ed5cc123d0c930e
2023-05-31 03:40:01 +00:00
Joel Capitao 92950a690d Replace Stdlib::Absolutepath by Stdlib::Compat::Absolute_path
The Stdlib::Absolutepath which was deprecated 4 years ago is
now removed since [1]. We replace it by the
Stdlib::Compat::Absolute_path [2] data type which contains the
same functions "is_absolute_path" and "validate_absolute_path".

[1] https://github.com/puppetlabs/puppetlabs-stdlib/pull/1324
[2] https://github.com/puppetlabs/puppetlabs-stdlib/blob/main/REFERENCE.md#Stdlib--Compat--Absolute_path

Change-Id: I0fa697cf5e46b7214dca7940d19be81203eed70d
2023-05-05 10:02:34 +02:00
Joel Capitao 439ce39e1a Replace stdlib hash function by the built-in Puppet one
The upstream patch [1] removed the hash stdlib function which was
deprecated since a while. We should now use the Puppet built-in
function Hash().

[1] https://github.com/puppetlabs/puppetlabs-stdlib/pull/1320

Change-Id: Id562cf4aa8cae94ae537ff239fac946884940082
2023-05-02 17:56:09 +02:00
Zuul 041da00755 Merge "Stop overriding default value for some limit options" 2023-04-11 16:28:26 +00:00
Zuul ec0775af28 Merge "Use separate file to store SECRET_KEY" 2023-04-11 16:28:24 +00:00
Takashi Kajinami 8a2be0b25a Use separate file to store SECRET_KEY
Horizon supports loading secret key from a separate file. This change
updates the configurations to use that feature instead of putting
the key content in local_settings.

This allows us to more strictly limit access to the key content.

Change-Id: Ie91c2286afc102145ee49f5ef91b250e92af16a7
2023-04-07 09:17:05 +00:00
Takashi Kajinami c7229c6176 Allow tuning cache timeout
This allows users to tune cache timeout in Django.

Change-Id: I18cf8d80074203c044e69609dd7f713f6a2a593d
2023-04-07 14:27:06 +09:00
Takashi Kajinami 10e543f333 Stop overriding default value for some limit options
This removes the hard-coded default values for the following options
so that we can leverage the defaults defined in Horizon itself.
 - API_RESULT_LIMIT
 - API_RESULT_PAGE_SIZE
 - DROPDOWN_MAX_ITEMS

Change-Id: Id392b959ff05bba0dd75343313b2c3f956d29565
2023-04-07 14:04:51 +09:00
Takashi Kajinami 0e618ae9e7 Debian: Fix the wrong package name of manila-ui
Closes-Bug: #2009921
Change-Id: I0e01ff19c8271162f693ec1859160a8377aacb3c
2023-03-10 17:28:38 +09:00
Takashi Kajinami 17f9bd3fcf Replace legacy facts and use fact hash
... because the latest lint no longer allows usage of legacy facts and
top scope fact.

Change-Id: I7a37d698eaf31fe51f656966cfcda44721648b17
2023-03-02 12:23:01 +09:00
Takashi Kajinami ead7aabb85 Support customizing HORIZON_CONFIG['bug_url']
Change-Id: I912f7c7d9e7547e0d77b5af9b15492b439f1635c
2023-02-16 16:50:03 +09:00
Takashi Kajinami ba749e09d5 Override help_url only if needed
This omits override of help_url unless users explicitly define their
desired value, to reduce the hard-coded defaults maintained in this
module. This also effectively fixes the different scheme (http, not
https) used by default.

Change-Id: I40b4b20ab10650ae08e49b5773b838653c3c9c07
2023-02-16 16:46:26 +09:00
Takashi Kajinami 4f3e975a9e Deprecate ineffective images_panel
The images_panel key in HORIZON_CONFIG setting dict was once added
during Newton cycle but was removed when ANGULAR_FEATURES option was
added in the same cycle[1].

Because the parameter has have no effect for long, this deprecates
the parameter so that we can remove it in a future release instead of
fixing it.

[1] https://review.opendev.org/c/openstack/horizon/+/353377

Change-Id: I376af3b7c4525036bf1bb449cb71490495395f2c
2023-02-16 12:08:14 +09:00
Tobias Urdin 77dcef9b78 Add openstack_keystone_endpoint_type param
The new config option OPENSTACK_KEYSTONE_ENDPOINT_TYPE
is added in the [1] change and updated in change [2].

[1] https://review.opendev.org/c/openstack/horizon/+/844574
[2] https://review.opendev.org/c/openstack/horizon/+/868060

Depends-On: https://review.opendev.org/c/openstack/horizon/+/868060
Change-Id: I1be058ebf43f7f40d73ddf67c8356282a6acaacc
2023-01-16 16:03:55 +09:00
Takashi Kajinami d906fe4ee6 Fix the wrong key to look up designate policies
This change fixes the key to look up designate policies from the base
horizon class parameter. The previous value is for octavia.

Change-Id: I5ef41b5ccc49b742172848f2ff63b08f038c114b
2022-10-24 17:48:33 +09:00
Zuul 0567b22ea1 Merge "Ensure pymemcache library is installed" 2022-09-01 11:23:35 +00:00