Commit Graph

260 Commits

Author SHA1 Message Date
Takashi Kajinami b7b040c4e2 Stop hard-coding config file for db sync
The gnocchi-upgrade command by default loads /etc/gnocchi/gnocchi.conf.
Removing the override allows us to use additional paths such as
gnocchi.conf.d in the future.

Change-Id: Ibe0c1138eebeb17fb6d06a7e648eab563f47fe1f
2024-03-05 12:25:45 +09:00
Takashi Kajinami 3bf5d9ed3c Refactor resource dependencies
This refactors resource dependencies to improve the following points.

 - Avoid unnecessary dependencies across services. For example aodh
   service does not require cinder db.

 - Restart only api service when config files like paste.ini, which
   are used only be api service is changed.

Change-Id: Ib89091baaf9aba0809c2e9405389545168b755ec
2024-03-01 12:23:19 +09:00
Takashi Kajinami 7ddb186ec5 healthcheck: Expose ignore_proxied_requests parameter
Depends-on: https://review.opendev.org/909807
Change-Id: Ibdc5ac824241d1638fcf6066d2f51601792fcd6b
2024-02-26 01:26:24 +09:00
Takashi Kajinami ac20db89d0 healthcheck: Expose allowed_source_ranges
... which was added to puppet-oslo recently.

Depends-on: https://review.opendev.org/905557
Change-Id: I671ab529cee053f59e611e119af93d7123756e2a
2024-01-17 02:58:27 +09:00
Takashi Kajinami 95141e1806 Remove unused base provider class
The Puppet::Provider::Gnocchi class has never been used.

Change-Id: I5ab5759bd920d7b0160ece2b0d19b51e34207435
2023-11-21 23:12:55 +09:00
Takashi Kajinami 73955e07e3 Remove usage of deleted manifest_dir
Recent update in rspec-puppet removed some of the config interfaces for
old puppet versions[1]. This drops usage of these interfaces to resolve
the following error in unit tests.

```
An error occurred while loading ./spec/unit/provider/manila_spec.rb.
Failure/Error: c.manifest_dir = File.join(fixture_path, 'manifests')

NoMethodError:
  undefined method `manifest_dir='...
```

[1] 316d95923c

Change-Id: I2d6fc892cb0d3784430223d903f0f48f32aab1bc
2023-10-11 11:59:55 +09:00
Takashi Kajinami f36eb38cd2 Remove redundant usage of integration_enable
The parameter can be easily replaced by the backend parameter.

Change-Id: I6aa92f859fd07963d4a821fbf5983406a9210054
2023-08-22 10:58:31 +09:00
Takashi Kajinami de085305c4 Refactor db class using oslo::db
This replaces the existing logic in the gnocchi::db class by the common
logic in oslo::db, to use the single logic to manage backend packages.

Depends-on: https://review.opendev.org/889374
Change-Id: Icd916df0b3463128df5b2ed3b49c2cdbee871504
2023-07-25 13:49:17 +00:00
Takashi Kajinami 120450bec8 CentOS: Stop installing gnocchi-indexer-sqlalchemy
The package was merged into the common package a long ago[1], and we
no longer need to install it explicitly.

[1] af210a84ac

Change-Id: I845b4d99711055ed6a6feb1df2d1e287ea53a0fc
2023-07-25 16:11:24 +09:00
Tobias Urdin fea62d44e9 Add per module policy service refresh
Updating the policies for this project should only
refresh the services that reads it.

Change-Id: I5b7504bc02b2576a8921d1a70bc1bd07b19c1023
2023-06-26 00:04:31 +02:00
Takashi Kajinami 74e7afdb9e replace validate_legacy with proper data types
the validate_legacy function is marked for deprecation in
v9.0.0 from puppetlabs-stdlib.

Change-Id: I14ad3f5a77573b1bf82b490249ca5a8a6b220565
2023-06-19 18:08:52 +09:00
Takashi Kajinami a8fc8c9722 Make sure redis urls are hidden
This makes sure that the parameters which accept redis url are hidden
from logs, because redis url can contain password as a URL element.

example: redis://:password@127.0.0.1:6379

Closes-Bug: #2012246
Change-Id: Ief97f9e28ed7e318b56b27f03214ecc76de6798e
2023-03-20 21:10:16 +09:00
Takashi Kajinami 37049a867d Replace legacy facts and use fact hash
... because the latest lint no longer allows usage of legacy facts and
top scope fact.

Change-Id: Ia9ab733a7fc5cbb5b23659ff7cbfd3b2b7d2fb18
2023-03-02 10:57:25 +09:00
Takashi Kajinami ecd6b5a669 Expose policy_default_rule
The option has been managed by the underlying puppet-oslo module but
has not been configurable. This introduces the parameter to customize
the option.

Change-Id: I010ef8ed814af439621cf944eb62426d7adb5d6f
2023-01-23 14:29:25 +09:00
Takashi Kajinami 86fc061b4c Replace deprecated [oslo_middleware] enable_proxy_headers_parsing
Gnocchi replaced usage of http_proxy_to_wsgi middleware from
the oslo.middleware library by its own implementation since Gnocchi
4.4[1]. Because now both Ubuntu and CentOS uses Gnocchi 4.4.z, this
replaces the deprecated [oslo_middleware] parameter by the new [api]
parameter.

[1] bcd9a8cdd7

Change-Id: I52ba953c481bb66dd8a5af35b74c11dac6278e45
2022-09-06 17:17:03 +09:00
Takashi Kajinami b607c46cef Enable memcached and redis in acceptance tests
... because these are required as cache/coordination backend.

Change-Id: I16594b5e046fcc6639c134bc8ce566f8ffbc3f43
2022-08-31 00:50:51 +09:00
Takashi Kajinami 990298ddd5 Add Apache WSGI logging parameters for pipe/syslog
Add parameters for advanced logging configurations in Apache to
support piped logging and support for syslog (via mod_syslog
available in Apache >= 2.5.0)

Co-Authored-By: Andy Botting <andy@andybotting.com>
Change-Id: Ifa33b2e84284d8032c4e4f54acb26c30fc285cb5
2022-08-26 17:41:09 +09:00
Zuul 1774c83c7d Merge "Adapt to new type validation in puppetlabs-apache" 2022-08-08 19:35:37 +00:00
Takashi Kajinami 6da581fa02 Adapt to new type validation in puppetlabs-apache
The puppetlabs-apache module is enforcing more strict data type
validation[1].

This change updates the default values to adapt to that change.

[1] f41251e336

Closes-Bug: #1983300
Depends-on: https://review.opendev.org/851652
Change-Id: Ie6310a022e9715336832865741318369bc3fa188
2022-08-02 16:51:56 +09:00
Zuul f9bdbbbdc4 Merge "Expose headers option of apache::vhost" 2022-07-30 17:53:10 +00:00
Takashi Kajinami 6c4faf84a6 Revert "CentOS 9: Disable unit tests dependent on puppet-postgresql"
This reverts commit f016d7261c.

Reason for revert:
puppet-postgresql 8.1.0 was released and now the module supports RHEL 9
(and CentOS 9 effectively).

Note:
This change adds the service_provider fact in test fact data because
it is required by puppet-postgresql.

Depends-on: https://review.opendev.org/850705
Change-Id: Iae81321d06d05ccb7f85fe982a017580480146e6
2022-07-24 00:39:17 +09:00
Zuul 160e89609b Merge "Add acceptance tests for config management resources" 2022-07-15 20:20:07 +00:00
Takashi Kajinami 580c78b2f4 Fix wrong test description
The value with a white space should be accepted instead of being
rejected. This change fixes the wrong test case description and makes
sure the description explains what is actually tested.

Change-Id: I75733a1da603e7817a4f14a09fd8693225a7bb4a
2022-07-15 11:42:27 +09:00
Takashi Kajinami 12e4836ca3 Add acceptance tests for config management resources
Change-Id: Ida98dd3bc20465f51a3eb48e957ab72b9dda2285
2022-07-10 12:44:17 +09:00
Takashi Kajinami 3be542d7b2 Expose headers option of apache::vhost
The headers option in apache::vhost is required in some case, for
example when adding the X-XSS-Protection header. This change allows
customizing the option for the api vhost.

This change also adds support for request_headers so that both request
headers and response headers can customized.

Change-Id: I9fe841e9dc2a90627d0debdc9b6766a847390aed
2022-06-30 11:03:15 +09:00
Rajesh Tailor b2516674df Fix typos in parameter descriptions and tests
Change-Id: I20e1dda110e479e796604991be240021fd51d861
2022-06-20 15:50:42 +05:30
Zuul 0fc51b7e6f Merge "Add support for [statsd] creator" 2022-05-11 10:19:51 +00:00
Takashi Kajinami ce404cc090 apache+mod_wsgi: Disable SSL by default
During the previous cycle, a warning message was added to inform users
of this change.

Now the default value is updated so that SSL is disabled by default.

Change-Id: I7f32413d452e98306906002461ae0b4304d284ca
2022-05-06 20:43:30 +09:00
Takashi Kajinami bdde282558 Add support for [statsd] creator
Change-Id: I719ff8386c7ea73cbaeae4d7db8cc6ed82b8cf79
2022-04-25 08:51:51 +09:00
Takashi Kajinami 4bd702bc91 statsd: Add support for host and port
This change introduces support for the following two parameters.
 - [statsd] host
 - [statsd] port

Change-Id: Ia4e4a5d5ae40a7d4a358569d9caacb07ff391d6a
2022-04-25 08:48:40 +09:00
Zuul 64e8e45990 Merge "Make sure archive_policy_name is cleared by default" 2022-03-30 07:46:59 +00:00
Takashi Kajinami a7c94d05df Make sure archive_policy_name is cleared by default
The archive_policy_name parameter currently defaults to undef, which
leaves the parameter unmaintained. This change ensures the parameter is
cleared by default, as it is not set in the default configuration files
provided by packages.

Change-Id: I5a7b757307e5eae4f24f9c501a869d0693fc496b
2022-03-27 23:35:29 +09:00
Zuul 98cb98936f Merge "Do not hard-code default of [api] max_limit" 2022-03-26 14:39:38 +00:00
Zuul 0b0952dc83 Merge "s3_access_key_id should be secret" 2022-03-26 02:09:04 +00:00
Takashi Kajinami a84c8fa43f s3_access_key_id should be secret
The [storage] s3_access_key_id parameter is defined with the secret
flag, and its value should not be exposed.

Change-Id: I87fe4a3854e1f8c96041e665af16c677f14807c6
2022-03-23 00:25:05 +09:00
Takashi Kajinami 2ca1619677 Do not hard-code default of [api] max_limit
... because the current default value is same as the service default.

Change-Id: I5208f5be47d20c55afa3c3f2aebd2787939ccd26
2022-03-22 18:46:00 +09:00
Takashi Kajinami 04301ef449 Support [api] operation_timeout
Change-Id: Iccc6b6f0632c7b20b0e2385467ae0cd459928128
2022-03-22 18:44:54 +09:00
Zuul c1373508ea Merge "Add support for [storage] ceph_timeout" 2022-02-20 11:50:05 +00:00
Takashi Kajinami f016d7261c CentOS 9: Disable unit tests dependent on puppet-postgresql
The puppt-postgresql module does not support CentOS 9 yet and requires
some version parameters to be run on CentOS 9. This change disables
unit tests requiring that module, until the module supports CentOS 9.

Change-Id: If2a75b639e923e96617afd161bdcff8431d877d5
2022-02-16 01:44:36 +09:00
Takashi Kajinami 337b4e91ac Add support for [storage] ceph_timeout
Change-Id: Id8e4e924b9f38bf512bd571ab4109ad5fca7e9f8
2022-02-09 23:20:36 +09:00
Takashi Kajinami ea401f3f6f gnocchi::db: Do not test behavior of lower libraries
Current unit tests of gnocchi::db tests behavior of puppetlabs-mysql
and puppetlabs-postgresql but this is not necessary and makes our
maintenance difficult because we need to update our tests according
to changes in lower libraries.

This makes these unit tests assert only interfaces and stop testing
behavior of these classes imported from libraries.

Change-Id: I94744b06d37a3a6b28bf8ea09c1096e454676b12
2022-02-02 22:22:27 +09:00
Takashi Kajinami b0656ac23b Do not declare service resource when manage_service is false
Change-Id: I6e8a61b641f86b241b71b55a93abd967960e0b96
2022-01-24 08:19:18 +09:00
Zuul feafe4c64a Merge "Make [statsd] flush_delay optional" 2022-01-07 23:51:58 +00:00
Zuul 37ec81ab5f Merge "Accept system scope credentials for Keystone API request" 2022-01-07 23:51:56 +00:00
Takashi Kajinami 701e66b4ca Load libraries in a single place
This change refactors how the dependent libraries are loaded during
unit tests, and load the libraries in the base spec_helper to avoid
duplicate and redundant implementations.

Change-Id: I4d346c09ddcd3d1c8a5420f1168dc0f0c06c9a6f
2021-12-27 10:37:50 +09:00
Takashi Kajinami 0bafc5e5ac Clean up direct dependencies on puppetlabs-apache
This change removes direct reference to some classes in
puppetlabs-apache. Details are explained below.

- The api class doesn't need access to anything defined in
  apache::params

- The following classes are included by the openstacklib::wsgi::apache
  resource type, and current inclusions are just redundant.

Change-Id: I3b7d44f4de42595817f3c52a4f5e6892baaac187
2021-12-08 22:36:05 +09:00
Takashi Kajinami 20efa3dc75 Add support for [api] paste_config
Change-Id: Ide71a2bd652db2c9e7c04d0679f507afb3de0a16
2021-11-30 16:14:23 +09:00
Takashi Kajinami f3c8731fcd Accept system scope credentials for Keystone API request
This change is the first step to support secure RBAC and allows usage
of system scope credentials for Keystone API request.

This change covers the following two items.
 - assignment of system scope roles to system user
 - credential parameters for authtoken middleware

Depends-on: https://review.opendev.org/804325
Change-Id: Ifbe407233c0739038f23c645f2bd544a409bb1cd
2021-11-25 21:14:45 +09:00
Zuul 5a3035d9eb Merge "Support more [metricd] parameters" 2021-11-19 00:02:07 +00:00
Zuul 6e91a0fc00 Merge "Allow customizing state of the python-ceph package" 2021-11-17 13:15:55 +00:00