Commit Graph

32 Commits

Author SHA1 Message Date
Takashi Kajinami d9840e99d0 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: Iadb8552abf55228729bf5d31795b1e4bbb8b9929
2024-03-01 02:31:36 +09:00
Takashi Kajinami 3021cd9daf replace validate_legacy with proper data types
the validate_legacy function is marked for deprecation in
v9.0.0 from puppetlabs-stdlib.

Depends-on: https://review.opendev.org/c/openstack/puppet-openstacklib/+/885996
Change-Id: I144468b4f5536a48702e457f2a5db879f3ca217a
2023-06-23 09:26:59 +09:00
Takashi Kajinami 5fe73417a2 Add strict validation about boolean parameters
This ensures the parameters used by if-else logic accept only boolean
values because non-boolean can result in unexpected behavior.

Change-Id: Ia67f4aba2c3064f9b0ba93430b9c0f7a14800ced
2023-03-16 13:21:52 +09:00
Takashi Kajinami da45ce8a21 Replace legacy facts and use fact hash
... because the latest lint no longer allows usage of legacy facts and
top scope fact.

Change-Id: Ib395d70d0d528adfef6600f67f9cd6bb238f8206
2023-03-02 11:31:36 +09:00
Takashi Kajinami ff16bee10a Remove some deprecated database parameters left
This is follow-up of c543bd33ae and
removes some deprecated database parameters still left.

Change-Id: I6325c5d8d290bf6176d17e4aea9058f85feea2f3
2022-02-09 09:59:17 +09:00
Takashi Kajinami c543bd33ae Clean up deprecated database parameters
Change-Id: I9d77ce1cbbd3fb8f7af2f144101ad064d760934e
2022-02-07 12:08:42 +09:00
Zuul 7a081328ae Merge "Do not validate database_connection format" 2020-08-31 15:30:39 +00:00
Takashi Kajinami a7ebf5ba55 Do not validate database_connection format
Currently we validate database_connection in 2 layers, each puppet
modules and puppet-oslo, however this makes it difficult to maintain
validation pattern because we always need to fix both.
This patch removes the validation from each puppet modules so that
we need to maitain only one place, puppet-oslo to update validation
logic.

Change-Id: I362610e251fa85cc60a8b0494775ee9db975cc37
2020-08-31 00:40:42 +09:00
ZhongShengping 9fd21cf7cf Add mysql_enable_ndb option
Add mysql_enable_ndb parameter to select mysql storage engine.

Change-Id: I6392637052f305f6c0b9381923d8e9a69774a51a
Depends-On: https://review.opendev.org/#/c/748067
Closes-Bug: #1892952
2020-08-26 11:55:57 +08:00
ZhongShengping 1084af6e86 Deprecate min_pool_size option
min_pool_size option is not used,see:

https://review.opendev.org/#/c/565090/

Change-Id: Ibd40fed67872c502f54f12c07ebe20fa47089aa5
Closes-Bug: #1868511
2020-03-25 14:53:41 +08:00
ZhongShengping 5a6838f7cd Remove idle_timeout option
The idle_timeout parameter has been deprecated for two releases.
We can remove it.

Change-Id: I4c764f182145bf651ce31f6b500cb5039094d91e
2020-03-23 14:45:48 +08:00
Tobias Urdin 5f6411c3dd Convert all class usage to relative names
Change-Id: I9982b8476ca9dab8a338b66db75d6da6519f9266
2019-12-08 23:07:36 +01:00
ZhongShengping 0e380a80b1 Deprecate idle_timeout option
The idle_timeout parameter is deprecated, use connection_recycle_time
instead[1].

[1]https://review.opendev.org/#/c/334182/

Change-Id: I8022329f612925eaad1efe7d445e584170b04d14
Depends-On: https://review.opendev.org/656106/
Closes-Bug: #1826692
2019-04-28 15:00:09 +08:00
Tobias Urdin e46b67d242 Use validate_legacy
This changes all the puppet 3 validate_* functions
to use the validate_legacy function.

The validate_legacy function has been available since
about three years but require Puppet >= 4.4.0 and since
there is Puppet 4.10.12 as latest we should assume people
are running a fairly new Puppet 4 version.

This is the first step to then remove all validate function
calls and use proper types for parameter as described in spec [1].

[1] https://review.openstack.org/#/c/568929/

Change-Id: I422be4bfb6fd6f73f0b24ae9464c5c85689594e1
2019-02-23 14:52:57 +01:00
ZhongShengping 1f34a436dc Add pool_timeout option
Add pool_timeout option to configure this value for pool_timeout with
SQLAlchemy.

Change-Id: I96157ad65fb96dfe56bae9c92d0fd7f74b62df62
Closes-Bug: #1757581
2018-03-22 11:09:50 +08:00
nanhai.liao c21602d8f4 Add support for db_max_retries param
The db_max_retries parameter regulates the number of reconnection
attempts performed after an error raised rather than at startup.

Change-Id: Ie4f94a07c6e6e9fdddd8c048447e493abb3ebd48
Closes-Bug: 1579718
2016-05-10 13:39:47 +08:00
dmburmistrov b63840b482 Purge redundant database configuration
* this logic is already applyed by oslo::db
* remove duplicated code
* purge unused params
* update tests

Change-Id: Icbfd98e57ff1af3f9c5f7c37012e2f5d8685eb1e
2016-04-12 20:46:21 +03:00
dmburmistrov 07dd209c02 Set oslo options in heat module through puppet-oslo
Key moments:
  * use oslo::{db,log}, oslo::messaging::{default,
    notifications,rabbit}
  * update top-file docs
  * add new parameters provided by oslo
  * update tests accordingly
  * add oslo dependency to "metadata.json"
  * add release notes
  * purge qpid rpc_backend configuration

Change-Id: I1a0df52a2e1475fbbf171e138ad3ef67566b041d
2016-04-11 16:47:46 +03:00
Javier Pena f70d5d5f31 Support of PyMySQL driver for MySQL backend
Add the ability to use python-pymysql library as backend for MySQL
connections.

Update acceptance tests to use pyMySQL.

Change-Id: Id27afb52428a50ec889e8ae77f3509e1ca956538
Docs: https://wiki.openstack.org/wiki/PyMySQL_evaluation
2015-12-03 10:11:31 +01:00
Mykyta Karpin ae20443751 Switch Heat to $::os_service_default - part 1
Switching Heat to usage of os_service_default fact

Change-Id: Iff9cda880bb938b1fff3bf217c7cbf233daaf68a
Related-bug: #1515273
2015-11-26 18:21:56 +02:00
Jenkins 416b57d850 Merge "Move deps & external hooks into a standalone class" 2015-10-23 12:11:06 +00:00
Sebastien Badia 0be4a41486 db: Use postgresql lib class for psycopg package
This patch introduce the same design than mysql for postgresql
by requiring dedicated lib::python class instead of declaring
a new resource package within heat module.

Change-Id: I386e61054e84b14d25afebb4aa415ab2b6161a57
2015-10-20 16:27:14 +02:00
Clayton O'Neill dca9fe942b Move deps & external hooks into a standalone class
Previously the anchors and dependencies that allow external hooks were
all in the main ::heat class.  However, if you wanted to include just
::heat::db::mysql, then it would fail, since it assumed the main heat
class was included.  This moves all of those resources and relationships
into a new class, ::heat::deps.  All of the classes will now include
this class so that the anchors and deps are always evaluated even if
only a portion of the classes are used, and even if ::heat isn't pulled
in.

Change-Id: I4297df160a7afae2b66c1ac76e37de313fa4fb09
Closes-Bug: #1507934
2015-10-20 09:57:36 -04:00
Yanis Guenane fb4486166a Introduce heat::db class
Current modules[1][2][3] implements a
<component>::db class that is not implemented in heat.
This commit aims to apply here the same logic

[1] https://github.com/openstack/puppet-nova/blob/master/manifests/db.pp
[2]
https://github.com/openstack/puppet-designate/blob/master/manifests/db.pp
[3]
https://github.com/openstack/puppet-ceilometer/blob/master/manifests/db.pp

Change-Id: I922260265d110d5823c546813ee125400ecc183d
2015-10-14 09:34:58 +02:00
Ian Wienand c6fb1f0e82 Remove heat::db class
heat::db is different to every other project's puppet modules.  All of
nova, glance, keystone and cinder take a "sql_connection" parameter to
the "main" (project name) class.

This removes heat::db and adds it into init.pp to maintain parity with
those projects.  This seems more logical than adding it to engine.pp;
since heat-engine is only using the DEFAULT section of heat.conf.

Change-Id: I4584cdb12d1f9e624228e6ee34b4bcfbf649a12e
2013-09-09 15:03:16 +10:00
Emilien Macchi 03ef6a7b7f Update the module for new config file method
Since we have now an only config file (heat.conf) with this patch:
https://review.openstack.org/#/c/36476/

This patch updates the module and delete old configuration files
support and add a test.

Also, I fixed some tab issues in manifests.
Fix bug #1207858

Change-Id: If3d044e2581156fa5ce4de19f5c740328efa0aa8
2013-08-06 23:28:31 +02:00
Émilien Macchi 5de381930a Update DB manifest 2013-06-09 23:19:25 +02:00
Émilien Macchi fa2d267593 Update DB & example manifest 2013-06-09 23:18:11 +02:00
Émilien Macchi a7e8f56feb Drop db-sync stuff 2013-06-09 23:06:40 +02:00
Émilien Macchi 2811170e94 Update dbsync class 2013-06-02 04:35:00 +02:00
Émilien Macchi 633e3d446e Update provider in db manifest 2013-05-30 22:13:13 +02:00
Émilien Macchi b63a40b030 Basic structure + DB + Client support 2013-05-30 15:20:11 +02:00