Commit Graph

111 Commits

Author SHA1 Message Date
Takashi Kajinami ced3a19408 Retire puppet-ec2api: Remove Project Content
Depends-on: https://review.opendev.org/c/openstack/project-config/+/912710
Change-Id: If7970a4632ff4bbe7211160f95a4c8b791cd892e
2024-03-13 16:40:36 +09:00
Takashi Kajinami 1d223f97a4 Support [cache] memcache_pool_flush_on_reconnect
Depends-on: https://review.opendev.org/902861
Change-Id: I7ce7568221b59a478e5ea2b5b11ff43b0fd8b829
2023-12-14 18:02:24 +09:00
Takashi Kajinami 308d969e68 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: I0a3be947704009a723bfc3181c5277afa12ec933
2023-10-11 11:58:45 +09:00
Tobias Urdin 8d522ae1f2 Add per module policy service refresh
Updating the policies for this project should only
refresh the services that reads it.

Change-Id: I306233bb64b1070f722d7897063a700050be0058
2023-06-26 00:04:10 +02:00
Takashi Kajinami d5ffaf4cec Revert "Replace deprecated [DEFAULT] ssl_* parameters"
This reverts commit e3f44b4ef5.

Reason for revert:
The original change was wrong because ec2api uses own ssl options
instead of ones imported by oslo.service.

Conflicts:
	manifests/api.pp

Closes-Bug: #2011569
Change-Id: I592fc1da6b364f017a7892a30ff42a61d86f4d9f
2023-03-14 11:15:31 +00:00
Takashi Kajinami f5c271ae44 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: I2382514189617edb9454c3d9e8b5f15de9c96237
2023-01-23 14:28:55 +09:00
Takashi Kajinami f9be89d0b9 Drop deprecated ssl_insecure parameter
This parameter was deprecated during the previous cycle by [1] because
the actual parameter no longer exists.

[1] a72e6fe949

Change-Id: Ieb53368b269f3323f54a0d14caf00dcf9b136831
2023-01-05 18:21:44 +09:00
Takashi Kajinami d38a9a5e60 Enable memcached in acceptance tests
... because it is required as cache backend.

Change-Id: I7d0adaf26b63109d341b5dff35510b64805b858c
2022-09-07 01:07:57 +09:00
Takashi Kajinami d57cc885f1 Ensure [DEFAULT] ssl_insecure is removed by default
... instead of leaving the parameter unmanaged.

Change-Id: Ic549c6f05e55d4b1249a2c068935b26cae81401b
2022-07-27 16:14:54 +09:00
Takashi Kajinami 7b2f0656a4 Revert "CentOS 9: Disable unit tests dependent on puppet-postgresql"
This reverts commit c12186f850.

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: I3f4b076bcd4754adfce0fba4117cf1bf26a1649f
2022-07-24 01:07:09 +09:00
Zuul 088f49c2ca Merge "Add acceptance tests for config management resources" 2022-07-15 19:43:07 +00:00
Takashi Kajinami 87e3112204 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: I773e1982437b8d3e0fb8cda26bf35f0e48521481
2022-07-15 11:41:03 +09:00
Takashi Kajinami 99c68313a7 Add acceptance tests for config management resources
Change-Id: I42660216f00544e5df19e29d8f602e8184bf7b25
2022-07-10 12:50:56 +09:00
Takashi Kajinami c1b264f37e Remove deprecated use_tpool parameter
... because it was deprecated during Yoga cycle[1].

[1] 1b1e2eb809

Change-Id: I51c0e0f0519a3802adecc8473640bbb5219d87b6
2022-05-17 11:46:06 +09:00
Takashi Kajinami e3f44b4ef5 Replace deprecated [DEFAULT] ssl_* parameters
The ssl_* parameters in the [DEFAULT] sections were deprecated and
the [ssl] parameters should be used instead[1].

[1] 2e2940d1e17706b9d6367ff1783bde9d41891bfa

Change-Id: If5ee27626b778bda4d8cb47162691f3cced35955
2022-04-07 11:28:40 +09:00
Takashi Kajinami a72e6fe949 Deprecate support for [DEFAULT] ssl_insecure
... because the parameter was already removed[1].

The ssl_ca_file parameter is left because it is still used by
the oslo_service library.

[1] 5fc752ca6fd1588cc04f3073d1c300d985581041

Change-Id: Ia1035589c68790239c6619f4f3f9b33d7b5ae66a
2022-04-07 11:28:31 +09:00
Zuul aae2074b2e Merge "Add socket keepalive options for the pymemcache backend" 2022-02-20 11:52:21 +00:00
Zuul 0df645b2b5 Merge "Add HashClient retry options for the dogpile.cache backend" 2022-02-20 11:52:18 +00:00
Zuul a63d909d6d Merge "Add cache client retry options for the pymemcache backend" 2022-02-20 11:52:16 +00:00
Takashi Kajinami d6327e99d7 Add HashClient retry options for the dogpile.cache backend
This patch specifies a set of options required to setup the HashClient
retry feature of dogpile.cache cache backend.

Original oslo.cache change:
https://review.opendev.org/c/openstack/oslo.cache/+/824944

Co-Authored-By: Hervé Beraud <hberaud@redhat.com>
Depends-On: https://review.opendev.org/826870
Change-Id: Icecc2329c7f4732ee63dbb34a1b8d9d99a30239a
2022-02-16 11:40:58 +09:00
Takashi Kajinami f2678624ec Add cache client retry options for the pymemcache backend
This patch specifies a set of options required to setup the retrying
wrapper feature of pymemcache (dogpile.cache) cache backend.

Original oslo.cache change:
https://review.opendev.org/c/openstack/oslo.cache/+/803747

Co-Authored-By: Hervé Beraud <hberaud@redhat.com>
Depends-On: https://review.opendev.org/826869
Change-Id: I9a7a3ae77d2445cec5470e8bfc9b9b651d37f783
2022-02-16 11:39:06 +09:00
Takashi Kajinami c12186f850 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: Ifbdbb09a4bf036421bd2bbe0eedb8dc929423738
2022-02-16 00:21:46 +09:00
Takashi Kajinami 6cc72a4ed6 Add support for MultiStrOpt
This replaces the provider implementation of ec2api_config type so
that MultiStrOpt, which is used by several options like
 - oslo_messaging_notifications/driver
 - oslo_policy/policy_dirs
are handled correctly.

Change-Id: If2441f4bf68b8e43a072d979a1c34a60c9c48bde
2022-02-13 01:26:10 +09:00
Takashi Kajinami 3e13dd80d6 Add socket keepalive options for the pymemcache backend
This patch specifies a set of options required to setup the socket
keepalive feature of pymemcache (dogpile.cache) cache backend.

Original oslo.cache change:
https://review.opendev.org/c/openstack/oslo.cache/+/803716

Co-Authored-By: Grzegorz Grasza <xek@redhat.com>
Depends-On: https://review.opendev.org/807851
Change-Id: I6156abd69160113113d8e239f7204ba9274a1ee7
2022-01-27 20:40:32 +09:00
Takashi Kajinami 630380ce90 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: I3858399136f886841c14c2880918cb8e6ee86756
2022-01-24 13:39:57 +09:00
Takashi Kajinami 67a614a46e Do not test authtoken parameters directly
The authtoken parameters are not managed directly but managed by
the keystone::resource::authtoken class. Thus we should avoid testing
parameters directly otherwise any change in the resource type can
cause test failures.

Change-Id: I57471c563a4a72ada8f8611b94a8e2a1e7b2df3e
2022-01-24 11:35:53 +09:00
Takashi Kajinami c683b00904 Support configuring oslo.cache to cache metadata
Ec2Api supports caching metadata using the olso.cache library[1]. This
change introduces the new parameter/class to configure that usage.

[1] 7939ce17e4e39cb7b0cd1a36d6626258f06dcc70

Change-Id: Idf122ad2744acdd020de3cedbd0fe099d5997c4a
2022-01-03 11:23:42 +09:00
Takashi Kajinami 5e83610448 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: I96e33813aaf07021b15d7ac47a9bc2f9d8308607
2021-12-27 10:35:04 +09:00
Takashi Kajinami ed337c9942 Do not test detail of keystone::resource::service_identity
... but test interfaces of that resource type. This helps us avoid
direct breakage caused by any change in puppet-keystone.

Change-Id: If806a05db2ce8b3c059aeb6beb6096c34523d73f
2021-09-29 00:25:50 +09:00
Zuul 861159ff83 Merge "Allow purging policy files" 2021-09-20 08:44:36 +00:00
ZhongShengping 4a068c6787 Add watch_log_file option
Add support for Using logging handler designed to watch file system.

Change-Id: I75cd42c0039aa75bb876cfdf8d963f8525b79de5
Closes-Bug: #1943212
2021-09-14 16:02:08 +08:00
Takashi Kajinami 89124fb85d Allow purging policy files
This change introduces the new purge_config parameter to the policy
class so that any policy rules not managed by puppet manifests can be
cleared.

Co-Authored-By: Martin Schuppert <mschuppert@redhat.com>
Depends-On: https://review.opendev.org/802305
Change-Id: Ia4e3b30c1ad7b9aaae2bd9377a539c77899c4f47
2021-09-04 21:56:38 +09:00
Takashi Kajinami 0d07da0981 Set fixture paths for unit tests
This change defines manifest_dir and module_path expicitly in unit
tests so that modules installed under fixtures directory is properly
loaded.

Closes-Bug: #1930403
Change-Id: I64316e1bb130c9bba96cfa77ee2a2971363dcd97
2021-06-02 13:56:55 +09:00
Takashi Kajinami aa9f9c9a40 Add support for oslo_policy/enforce_new_defaults
Depends-on: https://review.opendev.org/781428
Change-Id: Idf3229914bbd946a6bf04fd84e8015225e733a84
2021-03-24 11:25:28 +00:00
Takashi Kajinami b4769932b4 Fix a unit test error
This change fixes the following error which curently appears in unit
tests on Ubuntu Focal.

Failure/Error: let(:facts) { facts.merge! @default_facts }

TypeError:
  no implicit conversion of nil into Hash

Change-Id: I2911d57e7f07cd07da33e816e998ef3c4d8300b5
2021-03-24 19:50:13 +09:00
Takashi Kajinami 5804bbeccf Add support for the oslo_policy/enforce_scope parameter
Depends-on: https://review.opendev.org/#/c/759008/
Change-Id: I62c5627f9e4a8bdecef111160b4d8979b7a99dee
2021-03-21 10:53:36 +09:00
Takashi Kajinami 3ec9c0f470 Use yaml instead of json for policy file
Because usage of json for policy file will be deprecated and replaced
by yaml[1].

[1] https://governance.openstack.org/tc/goals/selected/wallaby/migrate-policy-format-from-json-to-yaml.html

Depends-on: https://review.opendev.org/769647
Change-Id: I1b2e963d47b92c9ab0a2da0aa5b115ccbbc54774
2021-01-07 23:19:26 +00:00
ZhongShengping 16eff399ad Allow db sync timeouts to be configurable
As Openstack projects continue to have longer database migration
chains, the Puppet default timeout of 300 seconds for an execution
is becoming too short a duration on some hardware, leading to timeouts.
As projects continue to add more migration scripts without pruning
the base, timeouts will continue to become more frequent unless
this time can be expanded.

Change-Id: Ia353f278db9426d29617d6c274fef0c8b71c53e1
Closes-Bug: #1904962
2020-11-23 09:27:52 +08:00
Takashi Kajinami 3676923863 Add support for the keystone_authtoken/service_type parameter
Change-Id: Ib339a05f90665933784047a5d8c09963a91a7923
2020-11-03 17:48:51 +09:00
Tobias Urdin fd9f32b1dc Add Puppet Litmus
Depends-On: https://review.opendev.org/#/c/740601/
Change-Id: Ib5a10aad2e91c05a7e2d4e6fa6de0f4f4b7c0bf2
2020-08-31 21:17:17 +02:00
Zuul 1064210fc9 Merge "Add mysql_enable_ndb option" 2020-08-27 13:44:48 +00:00
Zuul a9ab91e56b Merge "Use common class to manage apache service in beaker job" 2020-08-27 08:27:53 +00:00
Takashi Kajinami f9d3b55138 Use common class to manage apache service in beaker job
Depends-on: https://review.opendev.org/#/c/745246/
Change-Id: Id1a8cb39478dcf297354e2c0ab5413b40ac278b7
2020-08-27 12:01:04 +09:00
ZhongShengping fe9d2f513f Add mysql_enable_ndb option
Add mysql_enable_ndb parameter to select mysql storage engine.

Change-Id: Ib0abe3b751e65df7f73e02fc9feb472c6fd15471
Depends-On: https://review.opendev.org/#/c/748067
Closes-Bug: #1892952
2020-08-26 11:55:47 +08:00
ZhongShengping 69e3ae15e4 Add service_token_roles for keystone authtoken config
Add the ability to configure service_token_roles.

Change-Id: I0376fd70a261413621726b82524f57ab59b1c73e
Closes-Bug: #1892284
2020-08-20 10:41:27 +08:00
Lewis Denny 8610a7e5c4 Add support for the interface parameter in authtoken middleware
This patch adds support for [keystone_authtoken] interface parameter,
so that operators can define which endpoint should be used by authtoken
middleware.

Change-Id: I7cdb181057ad8a126fbbdd5d0862827a2ed28062
2020-07-16 10:40:24 +10:00
Takashi Kajinami 52a1300566 Remove password hash generation in each puppet modules
... and migrate it to openstacklib so that all logics about database
configuration are implemented in one common place.

Depends-on: https://review.opendev.org/#/c/728595/
Change-Id: I900142c35e8fb20d3279f607cdd80ad53157531c
2020-05-20 08:37:35 +09:00
Zuul ee7c812c76 Merge "Add CentOS8 to nodesets" 2020-05-11 22:38:58 +00:00
Takashi Kajinami 6aaadbe70e Add CentOS8 to nodesets
Change-Id: Ie3e3351058271288c726c046e4c8d912996169ea
2020-05-10 21:44:26 +09:00
Takashi Kajinami 9098cf80a6 Use anchor to require necessary packages
... so that correct packages are required without re-defining them in
resource implementations.

Change-Id: Ife5e91471449f27817297a9f7d35c6e0dc4fa82c
2020-05-04 14:59:18 +09:00