26 Commits

Author SHA1 Message Date
Takashi Kajinami
00064f41d2 Avoid hard-coding OS user/group in each manifest
and replace hard-codes by definition in params.pp .

Change-Id: I808f2c8bb4b8222b03c96faf400fb0a439dc31cd
2022-02-21 01:42:48 +09:00
ZhongShengping
0cb3a8b007 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: I19e62ec5f811b262b464815a5d7b6b7e2ed2eac1
Closes-Bug: #1904962
2020-11-23 09:27:52 +08:00
Takashi Kajinami
8a733cddad 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: I952e990e1f56d6e0226eac25397ab3062074551f
2020-05-19 21:51:56 +09:00
Tobias Urdin
a053d4e86e Convert all class usage to relative names
Change-Id: Ic7b8f4e584e3f1ed1d5c6c568cc6caf67493cdda
2019-12-08 23:24:12 +01:00
Tobias Urdin
880b5e0c1c 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: I5d1ebaf9a3b7f6637973ea846d3571c7364feb54
2019-02-23 23:12:52 +01:00
Tobias Urdin
c2c5c5f513 Use puppet 4 compatible mysql functions
These was introduced in 6.0.0 and is required to
support later version of puppetlabs-mysql.

Change-Id: I314811639b0d9130b4bef483d510a5ad18f201b5
2019-02-08 12:29:30 +01:00
ZhongShengping
90863dce61 Add 'openstack-db' tag to db-sync Exec resource
In order to make easy orchestration on all OpenStack db-sync, add this
tag so people can use this tag in composition layer.
A use case it to set some orchestration to make sure MySQL Galera is
ready before running any Exec with this tag.

Change-Id: I7baded10a128532f7267903fa8d14f576cd9f47a
Closes-Bug: #1755102
2018-03-12 16:33:10 +08:00
ZhongShengping
41cff39bde Add the setting log level
Increase the setting log level in the synchronization database.

Change-Id: I68698fd27f456fc310495f267852197147dd9c60
Closes-Bug: #1683567
2017-04-18 11:34:30 +08:00
Sharat Sharma
b2aeee7afe Added retries for db_sync
If db sync fails, it is never retried leading to errors. So, this
patch adds retries for db_sync to avoid sync fails.

Change-Id: I57496bae7a13a300cdc79b22780bce0f9134ddc4
Closes-Bug: #1628580
2016-09-29 14:16:24 +00:00
Matt Fischer
59f75e6085 Trove external dependency management
Move all dependency tracking to an external class which simplifies the
relationships and allows managing Trove without necessarily using
packages.

This change also cleans up how the client is handled to make
it more configurable and match other modules.

Finally the reference to the deprecated and non-functional
keystone::python class is dropped.

Change-Id: I943685fbeb114dead80b7465b8f5c564a0bc9fe0
2016-03-21 19:42:26 -06:00
Matt Fischer
b2c7774e6d Remove deprecated mysql_module references
Change-Id: I781a48ca333ebe252507a7cc1f35eb2f52f9c751
2016-03-17 16:57:58 -06:00
Lukas Bezdicka
0f3cbadfff Remove trove ubuntu package hack
Bug #1365561 has been marked as fixed so it should be safe to remove
hack adding group and file before installing package.

Change-Id: Id447a47a056a41d8c98b01d6769f4121a36d7aae
2015-12-03 16:05:00 +01:00
Liao Penghui
4d152b2a24 Fix db sync command resource title.
The db sync command resource title is not consistent with the title in
resource colector. This patch fixes the name for consistency.

Change-Id: I46e26f7afd1907ace4121bbf570c58d0939687ff
2015-11-16 15:23:09 +08:00
Emilien Macchi
fead756a6c Create Trove config before dbsync
Because packaging is trying to run dbsync while default config is
broken, as a woraround we manage Trove config *before* installing the
package so we can continue the installation with Puppet.

Also add a require to Package['trove-api'] on trove::db::sync class to
make sure trove-manage is installed before running the actual command.

This is a workaround and it could be reverted later when packaging issue
is triaged.

Change-Id: I82dc8b653bbbdc28bd165292649332310f252916
Partial-bug: #1451134
2015-05-04 23:13:15 -04:00
Emilien Macchi
bc197410ac MySQL: change default MySQL collate to utf8_general_ci
Install & configure MySQL database by using utf8_general_ci collation
which is the way documented in OpenStack [1] and already the default
in puppetlabs-mysql [2].

[1] http://goo.gl/GA5gyZ
[2] https://github.com/puppetlabs/puppetlabs-mysql/blob/master/manifests/db.pp#L7

Change-Id: Iafdb875ce636aefd81e07861230e3a60b3cd22c7
Closes-bug: #1446375
2015-04-21 20:39:29 +00:00
Lukas Bezdicka
b032aca232 Change sql_connection to connection.
Sql connection parameter is now in database/connection not
DEFAULT/sql_connection.

Change-Id: I5f7b48a1a6e092b9629145b57795cba0c351a4eb
2015-03-31 09:10:07 +00:00
Sebastien Badia
edde7da295 Migrate postgresql backend to use openstacklib::db::postgresql
Let migrate to the new openstacklib::db::postgresql helper for
postgresql backend. This commit also unpin postgresql fixture
(openstacklib support now the latest version of postgre module).

Change-Id: I9bf307d758c112a9b458dab3dfba26281278e38f
Implements: blueprint commmon-openstack-database-resource
2015-03-17 11:58:45 +01:00
Sebastien Badia
b946d3d245 Fix lint issues (doc, metadata, manifests)
Add puppet parameters lint (with puppet-lint-param-docs gem) and fix
missing documentations, this commit also fix manifest lint issues
(due to puppet-lint upgrade) and metadata.json file (SPDX license,
and open dependencies).

Change-Id: Iab6f84f42e8874a10a5fcc886b4a6556fe3e1ed0
2015-02-25 04:51:00 +01:00
Javier Pena
2ef93e8e90 Fix trove-db-sync
Trove db sync should use trove-manage db_sync, as described in
http://docs.openstack.org/developer/trove/dev/manual_install.html

Also, it should not depend on the python-troveclient package.

Change-Id: I4fca02a6e8d489f19617dd5bdf944ab8e146211d
2014-12-17 12:52:26 +01:00
Colleen Murphy
b9881559b1 Fix db sync relationships
- The trove module does not specify a 'trove' package resource, so use
  the 'python-troveclient' package resource.
- The trove module does not specify a 'DEFAULT/sql_connection'
  keystone_config resource and has no need to manage keystone configs,
  so use trove_config.
- The trove module does not specify a 'trove' user. The trove user is
  created by the trove client package, which is already related by the
  subscribe metaparameter, so remove the require relationship.

Change-Id: I4e9ae0403439a51889e5fb884e689f91b874ad4d
2014-10-23 16:00:49 -07:00
Sebastien Badia
1fc6cd2619 Migrate mysql backend to use openstacklib::db::mysql
Implements: blueprint commmon-openstack-database-resource
Change-Id: I0bde4c8f6609c3d7cefdfffcc0e6cf48f5e35592
2014-09-06 01:18:34 +02:00
Sebastien Badia
4e15809e99 Require Class['mysql::server'], not Service['mysqld'] when creating DB.
When using version >= 2.2 of the MySQL module, setting up the database
for Trove depended on the MySQL service (Service['mysqld']). However,
if the service is not managed by Puppet (e.g. it is managed through
Pacemaker instead), this would cause catalog compilation to fail because
there is no Service['mysqld']. This is the case when the MySQL module is
called with service_manage => false. Requiring Class['mysql::server']
instead fixes this.

Change-Id: I455d8e11d5ec18661fd18e797df9e5c7b654700d
Closes-Bug: 1349316
2014-08-12 15:39:44 +02:00
Soren Hansen
c7a5df8623 Use 2.2 as the default mysql_module
Change-Id: Iecb6e484b28c489d3ed1e610a36bdadc1ad0a84a
2014-07-16 18:47:36 +05:30
Emilien Macchi
dcef06f12d Implement tests for trove::api 2014-07-02 14:49:45 +02:00
Sebastien Badia
01439a4f96 Fix trove_config provider name and introduce postgresql support 2014-07-02 12:29:09 +02:00
Emilien Macchi
476f0d16db MySQL support
Add MySQL Support in the module:
- manage user
- manage database
- manage db permissions
- manage the db_sync to fill Trove schema

Signed-off-by: Emilien Macchi <emilien.macchi@enovance.com>
2014-07-02 10:58:01 +02:00