Commit Graph

35 Commits

Author SHA1 Message Date
Takashi Kajinami da507fc631 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: If2cbbc392bd54d906c7a4f51f1c7cfca69463aaf
2024-03-01 13:12:01 +09:00
Takashi Kajinami 8ed0bcb867 replace validate_legacy with proper data types
the validate_legacy function is marked for deprecation in
v9.0.0 from puppetlabs-stdlib.

Note that this change looses validation about pool ids. Alternatively
we can define a new data type to keep the validation, but these defined
types for pool-manager were already deprecated and useless and will be
removed in a near future release so we avoid that redundant step.

Change-Id: I85d7058bf379c6aa0e787b2f806f14aebf0693d3
2023-06-19 17:27:32 +09:00
Takashi Kajinami 03748f741c Add strict validation about (more) boolean parameters
This ensures the parameters used by if-else logic accept only boolean
values because non-boolean can result in unexpected behavior.
The previous attempt did not cover a few parameters which are now
covered by this change.

Change-Id: Icf6d679545f987a1ed1eb5cda9999c879bde8fb3
2023-03-25 14:50:25 +09:00
Takashi Kajinami dd44ce031e Replace legacy facts and use fact hash
... because the latest lint no longer allows usage of legacy facts and
top scope fact.

Change-Id: Ica6edbc7077c0bb2021cc737f44f3ced84cd5f83
2023-03-01 16:49:01 +09:00
Takashi Kajinami 37dbbe2960 Do not override defaults of oslo.db parameters
... but use the original defaults, because these are considered to be
reasonable values to start with.

Change-Id: I243aacab2fe4c1dac9fe383109866b3ccbcd0f26
2022-03-22 14:03:27 +09:00
Takashi Kajinami 77a0e87837 Remove deprecated database_idle_timeout
... because it was deprecated during Victoria cycle.

Change-Id: Ie1d82aab277cad70e5dbd76ab2aa856f46c71732
2022-02-08 22:43:44 +09:00
Takashi Kajinami d27168132e Remove deprecated database_min_pool_size
... because it was deprecated during Ussuri cycle.

Change-Id: Ia9cbd53825cc82ca33d5688cb27405d88ae46e36
2022-02-08 22:42:26 +09:00
Takashi Kajinami 3cbe2cb562 Fix wrong parameter name in deprecation warning message
Change-Id: I950cdbb4fad6def7054c6c6c2a18d6cfb15c318e
2022-02-08 22:42:25 +09:00
Takashi Kajinami b8d1841876 Use oslo::db class to set database parameters
This patch refactors the designate::db class, by using the oslo::db
class, so that we can get rid of duplicated implementations.

Change-Id: I13156970bdbebfb6c882f992815dcf73d3d0d399
2020-08-31 13:03:56 +09:00
Tobias Urdin 2e08a20412 Change to relative includes
Change-Id: Iff7244802a04967f1a4f06d2241118445510ac7b
2020-07-13 23:44:39 +02:00
Tobias Urdin b7f73b35c5 Convert all class usage to relative names
Change-Id: Iae69aff79cc231336b14d65305fff9c64cbd27e0
2019-12-08 23:04:25 +01:00
ZhongShengping bbc413908e Remove duplicated comment of sync_db
Change-Id: I80d147746f678e872cdb259118d7a63994c9a188
2019-04-28 15:17:06 +08:00
Tobias Urdin d83b0dafdc 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: If8c450da479eca3167d93a1ef29ac8b1bc4312ca
2019-02-23 14:41:42 +01:00
ZhongShengping 1e95f32a6f Add hooks for external install & svc management
This adds defined anchor points for external modules to hook into the
software install, config and service dependency chain.  This allows
external modules to manage software installation (virtualenv,
containers, etc) and service management (pacemaker) without needing rely
on resources that may change or be renamed.

Change-Id: If9fa188b7dca47e6724a737d66e34c0c85668c36
2016-12-01 08:44:02 +08:00
Emilien Macchi a0cd7a8a63 Lint fixes for absolute class name
This change updates the mysql require lines to resolve lint errors.

Change-Id: I8a64be7d92793c62aef35fc9ba72ac60838db5be
2016-06-28 15:46:21 -04:00
Alex Schultz af9f5be5e6 Support of PyMySQL driver for MySQL backend
This change adds the ability to use the python-pymysql library as a
backend for MySQL connections. This change also updates the acceptance
test to leverage the pymysql driver.

Change-Id: I9730266163166a9f75f68e25a26c6dcbf38fcea8
2016-01-06 23:08:57 -07:00
Yanis Guenane 135a1aca3b Update designate::db class to match other module pattern
This review aims to update the designate::db class to standardize it with the
other modules db classes[1][2]. It now offers the same parameters to customize
database connection behavior.  Some internal variable naming remains
different then other modules.  This is because designate simply uses
differen config file sections[3] then other OpenStack projects.

[1] https://github.com/openstack/puppet-neutron/blob/master/manifests/db.pp
[2] https://github.com/openstack/puppet-sahara/blob/master/manifests/db.pp
[3] http://docs.openstack.org/developer/designate/install/ubuntu-kilo.html#installing-designate

Co-Authored-By: Cody Herriges <cody@puppetlabs.com>
Change-Id: Ieb841a58429564e5f13d9f683a3a9ef875f1324a
2015-12-11 14:18:24 -08:00
Yanis Guenane 3d4879dc4d Creation of designate::db::sync
In order to standardize the way dbsync are run across our modules,
we create a new class designate::db::sync and
designate::db::powerdns::sync.
Those classes will be included if sync_db is enabled.

By making this transition the designate::db::sync class and the powerdns
related one can be returned by the ENC.

A use case would be in an highly available environment, with 3 galera
nodes, include designate::db on every node with sync_db set to false
and have the ENC return designate::db::sync just for one node.

Change-Id: I3e14b82055cfadf3274d6657413668b11f28ec49
2015-09-08 11:26:12 +02:00
Clayton O'Neill 5a37cc8127 Add hooks for external install & svc management
This adds defined anchor points for external modules to hook into the
software install, config and service dependency chain.  This allows
external modules to manage software installation (virtualenv,
containers, etc) and service management (pacemaker) without needing rely
on resources that may change or be renamed.

Change-Id: I2b5707a0fe3dd72a56bbf1d840b4197bfa3012db
2015-07-17 14:25:04 -04:00
Jenkins e787f372d6 Merge "Qualify designate Class requires" 2015-02-27 16:36:43 +00:00
Clayton O'Neill e204988f81 Require config before running dbsync
Need to have a backend set in the config file before we can run the db
sync.  Better to just wait for all config options to be in place before
running db sync to be safe.

Change-Id: Ibff46f878eed58cad6a9b2c04334203dc4604e4a
2015-02-26 18:33:40 +00:00
Clayton O'Neill 2dfe3c7fec Qualify designate Class requires
Change-Id: I2f07f24fff2b895077dc2200c675ed1546b5a8ba
2015-02-26 18:33:14 +00:00
Clayton O'Neill 4ce3c0558b Add Puppet 4.x lint checks
This changes the puppet-lint requirement to 1.1.x, so that we can use
puppet-lint plugins.  Most of these plugins are for 4.x compat, but some
just catch common errors.

Change-Id: I3b16baf063746024cb8dc89a931dae2f604258f6
2015-02-17 14:53:22 +00:00
Clayton O'Neill e1cfb0536d Fixup Juno mysql configuration
The config parameter has changed from storage:sqlalchemy/database_conection to just
storage:sqlalchemy/connection.

The dbinit command no longer exists, and the db sync command has been
renamed.

Change-Id: I69f529717de04ee0084188a7f94dab26bc120e2f
2015-02-15 15:12:28 +00:00
Sebastien Badia 1ecba59a87 documentation: Update readme and puppetdoc documentation
Change-Id: I97ea6e3b4e7c4ac8b407dd3b6d39fd54ffae70fe
2015-01-12 11:07:01 +00:00
Sebastien Badia 04b3b1ee78 Fix issue with MySQL module upgrade
Since commit c2f248b puppet-designate use openstacklib for db params and
therefore puppetlabs/mysql module > 2.2 wich doesn't include anymore the
class 'mysql::python'.

Change-Id: Ia513a31b1a5ddda3cea2c6761e7b6cb8cd7c3729
2014-11-02 17:27:16 +01:00
Sebastien Badia 3caedea97a Hide secrets from puppet logs
Currently secrets like rabbit_password or admin_password are laked

puppet logs when changed. This commit changes designate_*_config and
designate_*_ini types adding a new parameter that triggers obfuscation
the values in puppet logs.

Change-Id: I54e7c0bb27e46928db1a7f0125783c02d00d0e69
Closes-Bug: #1328448
2014-07-22 13:22:01 +00:00
Xingchao Yu 1f017351d9 Add .gitreview config
Change-Id: I012a0b214c5c05491d5cabf8a6725ca738f98586
2013-10-29 22:25:02 +08:00
Xingchao Yu 733ece3c91 Fix designate db init runs every time 2013-10-24 11:49:03 +08:00
Xingchao Yu 3734c69ecc Fix data-init run twice will fail 2013-09-27 10:45:34 +08:00
Xingchao Yu 9a654a36cf Fix logdir option 2013-09-26 21:21:17 +08:00
Xingchao Yu edff58e7e5 Change notify Exec['designate-dbinit'] 2013-09-26 11:38:43 +08:00
Xingchao Yu e18d1842bd Fix warning info 2013-09-26 10:57:57 +08:00
Xingchao Yu b4814ca4f6 Add dbinit_command 2013-09-26 10:09:33 +08:00
Xingchao Yu bbdbc64bb4 Init commit to do basic setting 2013-09-25 22:22:17 +08:00