the validate_legacy function is marked for deprecation in
v9.0.0 from puppetlabs-stdlib.
Note that this change removes the pattern validation about [DEFAULT]
pipeline. The existing pattern check is incomplete, because of
the following two reasons.
- the pattern does not guarantee that the requested pipeline is
really supported or not
- the pattern accepts a+b+c but the existing pipelines in glance
does not have any entries with this pattern
Change-Id: I156d9a3a30ba6c523a0b16a14bf8a1839b61fb78
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: Icd6698d7b15344b7ab1c14aad08ebc1cd61346f6
Closes-Bug: #1904962
... 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: I2908540605a824acdc48b478f76da17c5dd08a39
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: Ib21fef57404d63579743270be4080d248a4ca8cc
Make sure documentation is the same and follow
the standard which we are trying to enforce on
all modules.
Change-Id: I1b54aefa27a929946aaf91c6f863466df8b13107
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: I0a7d0859d2052e5a8b4805e82e4370057bedf0b2
Closes-Bug: #1755102
Since it's possible to run glance-api without glance-registry, we
shouldn't be passing the registry config file in every database sync.
This patch keeps the extra_param so that we can pass the config file if
the registry is enabled from other places.
Depends-On: Ib9f511219e8cb9a7322745b6bd7c4f9c9cc0c198
Change-Id: I4e7570bdc1b8d89c9914855fd8eec13688fbf9f3
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: I8778bd1b609bc5458a250111dc0a0f9b2fb52161
Closes-Bug: #1628580
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: If683fbd098e701a3c4da91941cf818b18b41b209
In the previous patch https://review.openstack.org/#/c/241003/4
the default value for the config file when running glance-manage
db sync was changed. This patch restores the old default value
for backwards compatibility.
Change-Id: I1c17461bf7f4922ece41673f3f726ec00b0cd4c7
Add parameter to glance::db::sync class to allow end
users to add command line parameters to the db sync command.
Change-Id: I043dd9560f7d5eb7bc18721e759e5f61186f5cf7
Partial-bug: #1472740
In order to standardize the way dbsync are run across our modules,
we create a new class glance::db::sync.
This class will be included if sync_db is enabled.
By making this transition the glance::db::sync class
can be returned by the ENC.
A use case would be in an highly available environment, with 3 galera
nodes, include glance::registry on every node with sync_db set to false
and have the ENC return glance::db::sync just for one node.
Change-Id: I16c8bc411bd34f720513a5d4c94e82b07105af20
Add puppet parameters lint (with puppet-lint-param-docs gem) and fix
missing documentations, this commit also fix metadata.json file (SPDX
license, and open dependencies).
Change-Id: I0d590b930a8d0263c3a74d861b9786770be7d183
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: I29ae9506cb638aa3e3925705bac945511c96ca8f
Implements: blueprint commmon-openstack-database-resource
Puppetlabs-mysql has been rewritten to be much
cleaner. This patch adds a new parameter for the
glance mysql class allowing users to use the new
version. Previous behavior will continue as normal
when using the old version (0.9)
Change-Id: Icdc787e325f3e86572f6930f1ab8c3d5291e67c9
In the origin glance::db::mysql, if the value of $allowed_hosts
contains or equals to $host, then puppet will complain duplicate
declaration error. This patch is aim to update the allowed_hosts
conditonal statement in glance::db::mysql.
There are two cases to pass $allowed_hosts to $real_allowed_hosts:
- If $allowed_hosts is array,then remove $host from $allowed_hosts;
- elsif $allowed_hosts is string and not equivalent to $host;
At last, if $real_allowed_hosts is not undef, then run
glance::db::mysql::host_access
Fix bug 1206444
Change-Id: Ic70aaaec493195c7277782abb87469f9809e5baa
Previously, the db::mysql class required mysql::server. This is
unnecessary since the mysql::db define requires the mysql::config
class for db creattion. Additionally, this prevents users from
using a different class such as galera::server to manage
the database.
Change-Id: I8ee9303eef67657dd2898d910897748a0af5415b
* Fix following warnings:
* double quoted string containing no variables
* indentation of => is not properly aligned
* quoted boolean value found
* variable not enclosed in {}
* Fix following errors:
* two-space soft tabs not used
* Remove quotes around class in include/require statements
* Remove some comments from the code, they added no value
Change-Id: I341b37f2c6795951f3285037b2fa612d767a4474
This allows Glance to be used with PostgreSQL.
Requires the puppetlabs/postgresql module. NOTE: I did add this
dependency to fixtures but did not add it to the Modulefile due
to the fact that the postgresql::python module hasn't been
released to puppetforge yet (although it is committed and tests
pass).
Change-Id: I3522d50935c81c8859c9f597df64aa0af6ca4e71
This commit moves the mysql specific db manifests
to the namespace glance::db::mysql.
This is done for two reasons:
- to create a directory loaction for manifests
for all future supported datbases
- to be consistent with other openstack projects