39 Commits

Author SHA1 Message Date
ZhongShengping
03db4e5145 Add pool_timeout option
Add pool_timeout option to configure this value for pool_timeout with
SQLAlchemy.

Change-Id: Ib84d68f367c043b40f15ec50d45093467f11a4f4
Closes-Bug: #1757581
2018-03-22 11:09:50 +08:00
ZhongShengping
76bce0ada4 Fix mysql connection
URL mysql://scott:***@some_host/some_db does not contain a '+drivername'
portion, and will make use of a default driver. A full dbname+drivername://
protocol is recommended. For MySQL, it is strongly recommended that
mysql+pymysql:// be specified for maximum service compatibility.

Change-Id: Ib5cbfcc412c04381f2fce9f319a313eb86ea7fa8
Closes-Bug: #1753342
2018-03-05 08:57:27 +08:00
ZhongShengping
fc4a0fd510 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: I0d18ec6ffe6b54c85773a6dabb0ed7b6f59a12f4
2016-11-29 17:32:37 +08:00
Alfredo Moralejo
af4af189ea Replace ceilometer-dbsync by ceilometer-upgrade
https://review.openstack.org/#/c/388688/ has removed ceilometer-dbsync
and ceilometer-upgrade must be used instead.

Additionally, ceilometer-dbsync enabled option --skip-gnocchi-resource-types
and ceilometer-upgrade doesn't, so i'm setting it by default to
ensure backwards compatibility.

Closes-Bug: #1641076

Change-Id: I383fb7922e7984b067742e10a370b0d2f574dbe9
2016-11-11 10:50:33 -05:00
Carlos Camacho
35ca4c173b 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: Iaf0d5ada30e0ea57d454ab1850cc61ee658cef64
Closes-Bug: 1579718
Co-Authored-By: Giulio Fidende <gfidente@redhat.com>
2016-05-15 08:39:17 +00:00
iberezovskiy
01668bfd32 Configure oslo related parameters using puppet-oslo
Additonal changes:

  * switch oslo related parameters to $::os_service_default
    as they are used in oslo defines
  * update unit tests
  * update docs for oslo parameters

Change-Id: I4f813444fbf141abe7f10b3aef7d1aa314ac0ac4
2016-04-11 18:11:08 +03:00
Xingchao Yu
27654f3e17 Improve format of the documentations.
This patch is aim to unify format of the documentations in all
ceilometer classes.

Change-Id: I8b617a14146a90758fa6b8898637206bff6d2f29
2016-01-11 22:33:42 +08:00
Emilien Macchi
51fdead1dc deprecate mongodb_replica_set parameter
mongodb_replica_set parameter has been dropped in Mitaka [1] and has no
effect anymore.
This patch deprecated our interface by sending a warning if the param is
set. If set, it has no effect though, since the param does not exist
anymore upstream.

[1] a6d608a332

Closes-Bug: #1528612
Change-Id: I49123b0f1353e24b217ea6f16f556ab25a6c86b0
2015-12-23 11:54:41 +01:00
iberezovskiy
ae60c149f2 Support of PyMySQL driver for MySQL backend
Add ability to use python-pymysql library
as backend for MySQL connections.
Update acceptance tests to use pyMySQL.
Docs: https://wiki.openstack.org/wiki/PyMySQL_evaluation
The same implementation as it's done for keystone:
https://review.openstack.org/#/c/242134/

Change-Id: If41a86abc3090dfb439d09cd63ae2ecb9a0b9598
2015-12-03 13:06:57 +03:00
Iury Gregory Melo Ferreira
6156cb49f2 Ceilometer $::os_service_default for db and log
Switch to $::os_service_default all params in logging and db.
Changes: logging.pp, db.pp and tests.

Related-bug: #1515273

Change-Id: I412104bf46c4b40fdbd366e3a8a9dc9de5abb5fd
2015-11-24 18:49:06 +00:00
Mykyta Karpin
1c651fe987 add mongodb_replica_set option to ceilometer module
This option sets name of the replica set
   which is used to connect to MongoDB database.

Change-Id: I6e5149d4f830677fc4bf3e363f7b999c0b06e399
2015-10-28 11:05:01 +02:00
Matt Fischer
fb936e5409 Remove deprcated mysql_module
This has been deprecated and non-functional for awhile, remove it.

Change-Id: Ibca25bf41e9bf7979f67829683f02611d537235d
2015-10-21 21:18:24 -06:00
Sebastien Badia
0edd125704 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 ceilometer module.

Change-Id: Id01849badb4ed5aeae541d0ae7e0d47af5d1f245
2015-10-20 15:37:09 +02:00
Yanis Guenane
4d72c6ceec Update ceilometer::db class to match other module pattern
This review aims to update the ceilometer::db class to standardize it with the
other modules db classes[1][2]. It now offers the same parameters to customize database
connection behavior.

[1] https://github.com/openstack/puppet-neutron/blob/master/manifests/db.pp
[2]
https://github.com/openstack/puppet-sahara/blob/master/manifests/db.pp

Change-Id: Ic5ca33f862da300f4f429524ba488568d0608cf3
2015-09-24 10:39:14 +02:00
Yanis Guenane
7b920066e1 Creation of ceilometer::db::sync
In order to standardize the way dbsync are run across our modules,
we create a new class ceilometer::db::sync.
This class will be included if sync_db is enabled.

By making this transition the ceilometer::db::sync can be returned
by the ENC.

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

Change-Id: I410f41fb4e61be848372820cdeb2110efc327161
2015-08-17 10:09:41 +02:00
Emilien Macchi
4cc03d183c Ensure python-mysqldb is installed before MySQL db_sync
When running MySQL for storage backend, we need to make sure
python-mysqldb is installed *before* the db_sync command, otherwise it
will fail:
"ImportError: No module named MySQLdb".

This patch ensure the ordering to ensure puppetlabs-mysql installed the
package before puppet-ceilometer tries to synchronize the MySQLdatabase.

Change-Id: Iae7c8f24fda32357a61ffa3b8597dd3413c303cb
2015-04-26 06:48:24 -04:00
Gael Chamoulaud
8d17c36818 Tag all Ceilometer packages
Some users wish to override the default package provider by their own.

Tag all packages with the 'openstack' to allow mass resource attributes
override using resource collectors.

Closes-bug: #1391209

Change-Id: If43101b9974d26c88f8612da64c5356a644f892e
Signed-off-by: Gael Chamoulaud <gchamoul@redhat.com>
2015-03-31 10:19:24 +02:00
Sebastien Badia
565c78cc7f 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.

This commit also remove custom metadata rake task (this task is now
provided by puppetlabs_spec_helper).

Conflicts:
	Gemfile

Change-Id: I22369948db6a2f8ddab9b8c93c3a047ff2e229ca
2015-03-11 09:03:59 +01:00
Paul Belanger
9edcfeeeab Fix syntax error with postgresql database string
Change-Id: Icc93b18218de57403c1f5d9793dfdd74dcb623d9
Signed-off-by: Paul Belanger <paul.belanger@polybeacon.com>
2015-01-05 23:54:05 -05:00
Colleen Murphy
15ab1a6e27 Migrate mysql backend to use openstacklib::db::mysql
Implements: blueprint commmon-openstack-database-resource
Change-Id: Iaa4f1cfb6a26795112117e2d3230b4a11250e2df
2014-08-13 11:13:44 -07:00
Soren Hansen
0d0eda813e Use 2.2 as the default mysql_module
Change-Id: I91c87fa0b4d5871aa936a5b4842b47f4cfee4ca8
2014-07-16 18:44:55 +05:30
Stefano Zilli
b10f1af5b0 Hide secrets from puppet logs
Currently secrets like rabbit_password or os_password are displayed in
puppet logs when changed. This commit changes ceilometer_config type
adding a new parameter that triggers obfuscation of the values in
puppet logs.

Change-Id: I9eb6504220c5337c154bf5ad86c7d22bea64df51
Closes-Bug: #1328448
2014-06-10 15:24:30 +02:00
Michael Chapman
addaf5179d Add support for puppetlabs-mysql 2.2
This patch adds support for the new version of
puppetlabs-mysql via a parameter that will change
which types and classes to depend on from the
mysql module. No spec tests are included since any
tests relying on the new module will fail until
the fixtures are updated.

Change-Id: I3f76cc600ef8d6e0c88c988f96aadbf18d81f7f1
2014-03-16 21:24:10 +11:00
Yanis Guenane
e6c1911943 Define $user referenced in db.pp
In db.pp, in the exec 'ceilometer dbsync' ressource the user
is supposed to be $::ceilometer::params::user, but it was
not defined.

Change-Id: I812b6ba2877faddfce86d3c97b95772b0d22d368
2014-02-21 14:26:06 -05:00
Yanis Guenane
1aa1d795f0 Allow db fields configuration without doing the dbsync
This commit allows one to configure the db fields without running the actual
dbsync command. It remains compliant with the current implementation, leaving
exec {'ceilometer-dbsync': in the catalog. One, now, can decide if it wants
the dbsync to take place or not.

This is useful when one picks mongodb as a backend and wants to use replicaset
This way it can scale horizontally and painlessly using the initSync feature
of mongodb. With this pattern one can add new member of the replica set
easily.

Change-Id: I8618bb385147176512fbda1540ba75ac95fccbf1
2014-02-20 10:03:28 -05:00
Francesco Vollero
0fb3b8f693 Updates to params.pp for mongo and postgres packages
*) Removed the hardcoded postgres package from db.pp
*) Changed the mongo package to python-pymongo for RHEL

Change-Id: Ib975f9ce03ee8ffa423e75b62b595bcdefdd1eed
Signed-off-by: Francesco Vollero <fvollero@redhat.com>
2013-11-14 17:49:10 +01:00
Benedikt Trefzer
0bd24d09a8 fix postgresql connection string
Change-Id: I55fab1b9256df92cd521141a9d04a2aa2feb08c9
2013-11-06 10:32:59 +01:00
Xingchao Yu
b7f74dfe96 Use connection to replace deprecated database_connection
This patch is aim to use new param connection in [database]
section to replace the deprecated option database_connection
in [DEFAULT].

Fixes bug #1222744

Change-Id: I82082b791a4c16eb50092b3a96fb8ae439af4e5b
2013-09-10 09:22:53 +08:00
Ian Wienand
60b0ff4786 Handle Centos/RHEL pymongo packages
RHEL/Centos has a different name for pymongo packages.  Fedora doesn't
provide python-sqlite2 so we undef that.

Fixes bug 1194141

Change-Id: If03f420c41e518227a1422882842661dfc8edd7e
2013-08-29 15:26:37 +10:00
François Charlier
50c802f371 Update existing puppetdoc & add missing puppetdoc 2013-04-23 11:22:31 +02:00
Mathieu Gagné
a530fe1100 Remove inheritance from ceilometer 2013-04-04 19:51:49 -04:00
Mathieu Gagné
938d647ac7 Remove ceilometer-dbsync override 2013-04-03 19:22:32 -04:00
François Charlier
3ce24a5561 Agents, Api, Db & Collector classes inherit from ceilometer 2012-12-20 15:09:08 +01:00
François Charlier
c32c3ef345 Add user to localhost 2012-12-17 17:14:57 +01:00
François Charlier
5c9f72f96d Add the dbsync file, it's not yet in the packages 2012-12-11 18:14:37 +01:00
François Charlier
9665551a5f Remove wrong requirement for ceilometer-dbsync 2012-12-10 18:00:20 +01:00
François Charlier
81657c5a1e Fix incomplete subscribe declaration 2012-12-10 17:56:10 +01:00
François Charlier
54582bbbde Fix the name of the ceilometer config provider 2012-12-10 17:29:37 +01:00
François Charlier
4ae12d7905 Add ceilometer-dbsync and fix some db-related deps 2012-12-10 17:22:46 +01:00