Commit Graph

861 Commits

Author SHA1 Message Date
Zuul f433c3fb90 Merge "Add config for extra regions" 2024-03-26 00:05:15 +00:00
Samuel Allan 422611f034
Add config for extra regions
This is so we can register extra region endpoints in horizon,
in situations where the keystone for the extra regions cannot be
integrated via juju (for example, completely separate deployment).

Closes-Bug: #1714926

Change-Id: I52cecec88437fd2bc5a012653f24471039e6b819
2024-03-21 10:50:01 +10:30
Rodrigo Barbieri 09c5871160 Adjust haproxy timeout to intended values
Many years ago change Ida7949113594b9b859ab7b4ba8b2bb440bab6e7d
attempted to change the timeouts of haproxy but did not succeed,
as deployments were still using the values from the charm's
templates/haproxy.cfg file, being effectively set to 30 seconds
and causing timeouts (see bug). Additionally, the description
of the config options became inaccurate, stating the default to
be a value that they were really not.

This patch addresses the timeout value discrepancy, adjusting
to the original change's intended values.

Closes-bug: #2045168
Change-Id: I83405727b4a116ec6f47b61211bf8ef3d2d9fbd6
2024-03-06 14:59:11 -03:00
Alex Kavanagh 63d0ffc157 Updates for caracal tox.ini
Update the tox.ini file(s) to use the constraints file from
zaza-openstack-tests.

Change-Id: I951e0a2b9e44158dd0d2586554d5380c981f46f6
2024-02-24 20:12:23 +00:00
Alex Kavanagh 959752f48c Updates for caracal testing support
These updates, on the master branch, are to support testing the caracal
packages and support of the charms for caracal.  They do NOT lock the charms
down, and don't change the testing branches to stable branches.

Change-Id: Id88fe1d5e3b177099966c659d11b96e6d1fb4c4f
2024-02-12 18:21:35 +00:00
Rodrigo Barbieri 6b93e9dd87 Allow configure of OPENSTACK_INSTANCE_RETRIEVE_IP_ADDRESSES
If network calls to retrieve ports and floating IPs take too long,
then the project > instances page cannot be loaded. This config
allows disabling the network calls when loading the page with
minor side-effects, as a workaround to avoid downtime while other
performance optimizations can be done on the side to allow
the page the load so the workaround is no longer needed.

Closes-bug: #2051003
Related-bug: #2045168
Change-Id: Iedad6ef48cbe0b776594f4ad8276d3d713cd360c
2024-01-24 11:19:01 -03:00
Zuul e5f3cf8395 Merge "Run relation_set() in dashboard_relation_changed() on leader" 2023-12-12 15:40:07 +00:00
Felipe Reyes 4d5581438a Run relation_set() in dashboard_relation_changed() on leader
The commit 484b7d8260 introduced a new relation that relies on an
application databag to exchange data, although only the leader can write
to it, and the original patch didn't guard the relation_set() call with
a is_leader(), this patch addresses that problem wich produces a hook
failure on follower units when openstack-dashboard is deployed in HA.

Closes-Bug: #2046257
Related-Bug: #2030094
Change-Id: I1930b0b96f65cb627f896db67dddc6370cf6a413
2023-12-12 11:06:29 -03:00
Zuul 9d9d16c435 Merge "Add local_settings.py template for Bobcat" 2023-11-21 12:24:47 +00:00
Alex Kavanagh 264a95c348 Improve platform mocking
Patch out charmhelpers.osplatform.get_platform() and
charmhelpers.core.host.lsb_release() globally in the unit tests to
insulate the unit tests from the platform that the unit tests are being
run on.

Change-Id: I9c5beab362cbf747eb757645fa3704043a2f14c7
2023-10-24 16:00:53 +01:00
Corey Bryant 16c5a02641 Add local_settings.py template for Bobcat
This fixes issues found in testing with Django 4 in mantic.

ugettext_lazy was deprecated in Django 3.0 and removed in
Django 4.0. Switch to gettext_lazy.

Switch to PyMemcacheCache backend as the Django MemcachedCache
backend was removed in Django 4.1 in favor of the PyMemcacheCache
or PyLibMCCache backend. This depends on a new openstack-dashboard
package version that will be provided in an SRU for bug #2039225.

Closes-Bug: #2039226
Closes-Bug: #2039225
Change-Id: Ia8e4f6f5f50d58268e4c6fa80c9f9c65a56a26ea
2023-10-13 15:03:09 -04:00
Zuul c2efb4207f Merge "Add new interface 'dashboard'" 2023-09-14 11:47:31 +00:00
Zuul b9b48089b7 Merge "Ensure get_requests_for_local_unit doesn't fail on incomplete relation" 2023-09-13 13:42:20 +00:00
Felipe Reyes 484b7d8260 Add new interface 'dashboard'
openstack-dashboard exposes the hostnames (and IP addresses) that can be
used by users to load Horizon. There are 3 possible sources, they are
juju units ingress-address, os-public-hostname and vip config options

Closes-Bug: #2030094
Change-Id: I5eb524c6258f72980ef43175f2bed21d7ca078be
2023-09-04 15:30:00 -03:00
zhhuabj 5c34112030 Support disabling apache wsgi socket rotation
Bug LP 1863232 introduced a new Apache configuration option called
WSGISocketRotation which allows users to disable wsgi socket
rotation. This patch makes this configurable with a new
wsgi-socket-rotation config option that defaults to the Apache
default and can optionally be set to False.

Closes-Bug: #2021550
Change-Id: I671f4b7f655f12cc558fc64116e31f16560dd2e7
2023-09-04 18:30:45 +08:00
Alex Kavanagh 02710c18d6 Ensure get_requests_for_local_unit doesn't fail on incomplete relation
This is a rebuild/make sync for charms to pickup the fix in charmhelpers to fix
any inadvertant accesses of ['ca'] in the relation data before it is available
from vault in the certificates relation.  Fix in charmhelpers is in [1].

[1] https://github.com/juju/charm-helpers/pull/824
Closes-Bug: #2028683

Change-Id: Iea8afd1720bac55321fbcc45aa21bb33f026b68e
2023-08-14 10:23:09 +01:00
Jadon Naas 21c1ab037e Fix typo in actions.yaml
There was a typo in actions.yaml for the resume action that was breaking
builds. This change fixes that typo. The charm will build.

Closes-Bug: 2030677
Change-Id: I470c5f340cbc1282d80396af3d19b9016bb10e2f
2023-08-07 15:59:35 -04:00
Corey Bryant b56c411c48 Add 2023.2 Bobcat support
* sync charm-helpers to classic charms
* change openstack-origin/source default to bobcat
* add mantic to metadata series
* align testing with bobcat
* add new bobcat bundles
* add bobcat bundles to tests.yaml
* add bobcat tests to osci.yaml
* update build-on and run-on bases
* drop kinetic
* update charmcraft_channel to 2.x/stable

Change-Id: I59aba33be9d8031f437e860200c6e6a1902630dd
2023-08-02 14:19:50 -04:00
Alex Kavanagh e8d0ca39a1 Make LocalSettingsContext more robust to priority
The relation data for for the LocalSettings context could cause the
priority sorting to break if the priority key wasn't cmpable (e.g. using
<, > or ==).  This patch fixes the associated bug, by making the sorting
extra robust and ensuring that un-cmp-able values are 'greater' (e.g.
further down the list) that cmp-able values, and equal to each other.
E.g. a partially ordered set.

Change-Id: I6bbf7e5f81a772ffc6ea859c9ab7c05f2eb9fdc5
Closes-bug: #2023404
2023-07-04 12:03:08 +01:00
Zuul cbcb084af8 Merge "Add package-upgrade action" 2023-05-31 21:17:21 +00:00
Corey Bryant ea6ad355bd Add package-upgrade action
The package-upgrade action performs package upgrades for the current
OpenStack release.

The code path used is similar to the openstack-upgrade action, with the
difference being that package-upgrade will not execute if an openstack
upgrade is available (based on the openstack-origin setting).

This change includes a charm-helpers sync.

Change-Id: I7a36e0f5f47423ae8601d6ca86aa0fe311ecb735
2023-05-26 16:55:30 +01:00
Felipe Reyes cc904247a2 Fix placement of vault unit.
Change-Id: I43048928cf319b5ca9a8af68000736ca26ffcf0e
2023-05-26 15:53:57 +00:00
Corey Bryant 9315fb5e5c Enable jammy-antelope voting and drop kinetic-zed tests
* Voting was turned on for jammy-antelope in the
  project-template for charm-functional-jobs in zosci-config
* Voting for jammy-antelope bundles with non-standard names
  is turned on in individual charms
* Kinetic-zed bundles/tests are removed

Change-Id: I46c1bb4a5c751d12435b6a42a59dd90413937d49
2023-03-29 21:01:50 +00:00
Corey Bryant dd8c4453b2 Add Antelope support
* sync charm-helpers to classic charms
* change openstack-origin/source default to antelope
* align testing with antelope
* add new antelope bundles
* add antelope bundles to tests.yaml
* add antelope tests to osci.yaml and .zuul.yaml
* update build-on and run-on bases

Change-Id: I236864fef58fb9b69a5298643a5c095fbfe2ca8e
2023-03-07 20:31:30 +00:00
Liam Young cc22020900 Fix charm for tox4 compatibility
Related-Bug: 2002788
Change-Id: I33c43ac69cc0ea3899a3f49ac83dcb58ed059317
2023-01-16 18:03:08 +00:00
Zuul 6f3ad3cf92 Merge "[DOC] Add details about custom theme folder structure" 2022-09-22 18:41:10 +00:00
Rodrigo Barbieri 366960f4c9 [DOC] Add details about custom theme folder structure
When using custom themes, some strict structure should be
used in order for it to work correctly.

Closes-bug: #1897805
Change-Id: I535478b06f8789f245b6c9fc523806c02c47a369
2022-09-22 15:23:12 -03:00
Zuul cca834cb50 Merge "ALLOWED_HOSTS must be list format for django 4.x" 2022-09-16 13:57:06 +00:00
Zuul f888f4dbb2 Merge "Disabled browser cache(excluding static files)" 2022-09-05 07:40:50 +00:00
Erhan Sunar a11b43558f Disabled browser cache(excluding static files)
Added or replaced Cache-Control and Pragma http headers with:
Cache-Control: no-store
Pragma: no-cache

func-test-pr: https://github.com/openstack-charmers/zaza-openstack-tests/pull/865
Closes-Bug: #1836518
Change-Id: If437c5e41892e09adbaaa1add494c85671706622
2022-09-02 07:09:38 +00:00
Alex Kavanagh ee9762367b Ensure that kinetic/22.10 is enabled
This patch adds kinetic to the metadata.yaml and ensures
that a run-on base for 22.10 is added in the
charmcraft.yaml

Change-Id: Ib0157b2ab640aac2441eeb08524367129d84db8e
2022-08-31 20:32:08 +01:00
Zuul 036a3927aa Merge "Add Kinetic and Zed support" 2022-08-30 03:37:22 +00:00
Corey Bryant 448daa6fdf Add Kinetic and Zed support
* sync charm-helpers to classic charms
* change openstack-origin/source default to zed
* align testing with zed
* add new zed bundles
* add zed bundles to tests.yaml
* add zed tests to osci.yaml and .zuul.yaml
* update build-on and run-on bases
* add bindep.txt for py310
* sync tox.ini and requirements.txt for ruamel
* use charmcraft_channel 2.0/stable
* drop reactive plugin overrides
* move interface/layer env vars to charmcraft.yaml

Change-Id: I2cb698f719106e54b06009f24ea47259419e9cad
2022-08-26 18:40:42 +00:00
Zuul 333501d88f Merge "Introduce source IP based rate limiting" 2022-08-19 13:52:29 +00:00
Liam Young 123b8447ed Handle JSON data from dashboard plugins
The dashboard-plugin interface sends relation data json encoded but
the charm does not decode the local-settings key. This change decodes
the data. I have not been able to find any classic plugins that
rely on sending raw data but to maintain backwards compatability
just incase the charm will fallback to the old behaviour if the
relation data is not json encoded.

Change-Id: I3f956ae811cb6c46b5e2ab31f1353678a35e623a
Closes-Bug: #1986538
2022-08-15 14:33:49 +00:00
Mert Kırpıcı c0f8708761 Introduce source IP based rate limiting
Since we are running haproxy in L4, we are tracking the incoming
byte rate from client IPs and rejecting TCP connections in a
sliding window.

This approach limits the incoming HTTP requests however image uploading
through the horizon web app is unaffected.

Change-Id: Ie40d28acb2dc2983fc9edbbeacfd671b380a8f6d
Closes-Bug: #1836514
Signed-off-by: Mert Kırpıcı <mert.kirpici@canonical.com>
2022-08-05 15:29:43 +03:00
Muhammad Ahmad af7a57d539 Add enable_router config option
This patch adds an option of enabling/disabling router panel view
in the horizon. To hide the router/floatin-ip panel, set the config
option 'enable-router-panel=False'. Default value is True.

Closes-Bug: #1966815
Change-Id: If6fb3b57f05a1ab6342077d2142bd47cfce57948
2022-07-28 18:57:15 +00:00
Corey Bryant c3f138ed27 ALLOWED_HOSTS must be list format for django 4.x
Closes-Bug: #1982199
Change-Id: I9f4251995481ca5970cb901c2fe27de3c5e31749
2022-07-19 15:10:56 -04:00
Zuul e47ecb9359 Merge "Set customization_module in local_settings.py" 2022-06-03 22:46:31 +00:00
Zuul f2c485dfab Merge "Fix warning messages related to enforce-ssl" 2022-06-03 21:33:07 +00:00
Felipe Reyes 15c0d34211 Set customization_module in local_settings.py
The configuration key customization-module is expected to set
HORIZON_CONFIG["customization_module"] in local_settings.py although
this was missing from the template for releases >= newton.

Change-Id: Ia741bf3d8298f66b4f1e2324159d4ab851634efb
Closes-Bug: #1977494
2022-06-03 14:56:40 -04:00
Felipe Reyes a4ee714eb7 Pin tempest for python<3.8
Change-Id: Icafb620026f92017d18b0447a7ad0de3f7763f2c
2022-06-03 11:21:59 -04:00
Pedro Castillo 85423b1f73 Fix warning messages related to enforce-ssl
When enforce-ssl is set to false, a warning message comes up saying it is
set to true. This should stop the message from coming up when
enforce-ssl is false.

Related-Bug: #1818636
Change-Id: I6afe116c0cd1e04b5c37413c7daf556a9b05dee4
2022-05-31 17:54:18 -05:00
Zuul c2c1be3070 Merge "Force resolve configs after openstack-upgrade action" 2022-05-10 14:10:58 +00:00
Zuul b27c840785 Merge "Validate X509 certificate inputs" 2022-05-10 14:10:56 +00:00
jneo8 b00c977b52 Add CREATE_INSTNACE_FLAVOR_SORT option
Closes-Bug: #1663191
Change-Id: I56a30b4b80ef2cb3ac96359a3932b53c735b5c01
2022-04-28 12:06:32 +00:00
Alex Kavanagh 1749801238 charmhelpers sync for yoga release
Change-Id: I9d1b8667c6049d2337072aea863492bd3d30d3ed
2022-04-07 12:29:23 +01:00
Ksawery Dziekoński fc2fc81ed5 Validate X509 certificate inputs
Related: LP#1772674
Change-Id: Ia6f44eb7aa0b37b0efa961d1ae48ac69c688b592
2022-04-07 12:38:53 +02:00
Alex Kavanagh eb913cfb5d Updates to enable jammy and finalise charmcraft builds
- Add 22.04 to charmcraft.yaml
- Update metadata to include jammy
- Remove impish from metadata
- Update osci.yaml to include py3.10 default job
- Modify tox.ini to remove py35,py36,py37 tox target and add py310
  target.
- ensure that the openstack-origin is yoga
- Fix mocking on unit tests for install.real hook

Change-Id: I7bf692965341c0cc1c84c7d3c77cce63a6cb6cbc
2022-04-06 11:04:01 +01:00
Billy Olsen 52145181c8 Force resolve configs after openstack-upgrade action
Force resolve the global configs option after an openstack upgrade
action is run but before the config_changed hook is run. This ensures
that the global CONFIGS values are updated to the appropriate templates
before rendering the update config.

Change-Id: Id8ed2f6d60cf79e1360ca7587aa771ffbe1af9aa
Closes-Bug: 1928853
2022-03-14 12:12:06 -07:00