367 Commits

Author SHA1 Message Date
Takashi Kajinami
4ffebe8483 Remove support for MemcachedCache backend
MemcachedCache backend was removed in django 4.1[1]. The latest horizon
requires django>=4.2[2] so we are no longer able to use the backend.

[1] 05f3a6186e
[2] 605a515ebc31beb66ff46cb193bc96c62d086ff6

Change-Id: Ia8c3f11aa33d4a48577be83c3372229818789543
2024-12-13 23:47:21 +09:00
Takashi Kajinami
ce86df8101 Require absolutepath for cache cert/key file
.. to make sure these files are loaded from the expected place.

Change-Id: Ib0e2dfc7f4c0149dc02e13058037707ac4d655a2
2024-10-29 19:57:17 +09:00
Tobias Urdin
cd5216f5a5 Pass custom_wsgi_process_options to horizon::wsgi::apache
This adds the custom_wsgi_process_options parameter to
the horizon class that is passed down to the
horizon::wsgi::apache class when configure_apache is
set to true.

Change-Id: I986aeb9766a777eaf82f1f2fccfed95b380dc4c7
2024-10-28 15:05:32 +01:00
Takashi Kajinami
97dccdbdef Validate policy definitions using the new data type
... and also validate input for file mode using the existing type
definition from puppetlabs-stdlib.

Depends-on: https://review.opendev.org/930837
Change-Id: I688824ebcc2042548dc18f60b715b11c1d7cdb2f
2024-09-30 12:37:15 +09:00
Takashi Kajinami
31e1a0f087 Enforce yaml format for policy files
Support for json format has been removed[1]. Also require boolean
parameter for purge_config.

[1] d689704739abac1711403b3379537e80de212d91

Change-Id: Ib243acde3d31f599efe6cbbc67bc651212d71e98
2024-09-30 12:32:38 +09:00
Zuul
7bc0f9abc8 Merge "Fix rendering of EXTERNAL_MONITORING" 2024-09-18 09:25:12 +00:00
Zuul
609c903ef1 Merge "Validate HTTP(s) URLs" 2024-09-18 04:03:34 +00:00
Takashi Kajinami
0459866871 Fix rendering of EXTERNAL_MONITORING
This value passed to this option should be rendered as a list value.

Note that this change enforces usage of an array value to make
users aware of the change more certainly.

Change-Id: Ic3b7a46ebeba9edbccbe63a6616ecb6c94fe9d4e
2024-09-18 11:04:53 +09:00
Takashi Kajinami
41b65d43c5 Validate HTTP(s) URLs
puppetlabs-stdlib provides the type definition to validate HTTP(s) URL
string. Use the type to validate parameters which expect HTTP(s) URLs.

Change-Id: I676c6eafa9dfbc361744f753493b630ef786789a
2024-09-17 09:59:12 +00:00
Takashi Kajinami
64e2c0150d Reject non-hash value for cache_option
... instead of ignoring the input, to help users identifying
the potential problem.

Change-Id: Iecdf1632cc606bfa6de1b3ad7abd38bdb1552e66
2024-09-17 17:56:13 +09:00
Benedikt Trefzer
571217e432 add show_diff parameter to see diffs in localsettings file
This makes setup much easier if diffs are displayed.

Change-Id: I67070af3437986382a6c02450a3deb7daa1f1b53
2024-08-08 04:11:33 +00:00
Takashi Kajinami
ddec1b8866 Support COMPRESS_ROOT option
Change-Id: I037f1ecd857981b5dc6b4162007480484c48f681
2024-08-03 21:18:16 +09:00
Zuul
4aebd41d57 Merge "Add support for SIMULTANEOUS_SESSIONS options" 2024-05-02 11:41:54 +00:00
Takashi Kajinami
505dc74dcf Add support for SIMULTANEOUS_SESSIONS options
... which was added in 21.1.0 (Yoga) release[1].

[1] https://docs.openstack.org/horizon/latest/configuration/settings.html#simultaneous-sessions

Change-Id: I3d9b04c04828641535ff42866ee378b2b902ebe0
2024-05-01 20:50:32 +09:00
Takashi Kajinami
2ca1c1a981 Support MEMOIZED_MAX_SIZE_DEFAULT option
... which was added in 15.0.0 (Stein) release[1].

[1] https://docs.openstack.org/horizon/latest/configuration/settings.html#memoized-max-size-default

Change-Id: I2057f507c17e097795825d98d2aa234b0269138f
2024-05-01 17:27:38 +09:00
Zuul
1dcc7f7df5 Merge "Make sure python3-redis is installed" 2024-04-25 15:36:33 +00:00
Takashi Kajinami
a802b575de Make sure python3-redis is installed
... when RedisCache is used

Change-Id: Iaf5dae66cfbc505fdd829630eaec9127b4185247
2024-04-18 07:17:02 +00:00
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] 54a31c91fdd3ae24fc9370ecf9cbcee8b42e51fc

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] 4f3e975a9e50048db4abd14c52f532298212f88a

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