18 Commits

Author SHA1 Message Date
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