... 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: I1e0061aea6782bd61e745bb39683589794231a5f
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: I422be4bfb6fd6f73f0b24ae9464c5c85689594e1
Previously the anchors and dependencies that allow external hooks were
all in the main ::heat class. However, if you wanted to include just
::heat::db::mysql, then it would fail, since it assumed the main heat
class was included. This moves all of those resources and relationships
into a new class, ::heat::deps. All of the classes will now include
this class so that the anchors and deps are always evaluated even if
only a portion of the classes are used, and even if ::heat isn't pulled
in.
Change-Id: I4297df160a7afae2b66c1ac76e37de313fa4fb09
Closes-Bug: #1507934
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: I032ee01505e0cbc125b0e219c436b77c93f57720
- This puppet-lint plugin checks if all parameters are documented
- Fix some unaligned arrows
- https://github.com/domcleal/puppet-lint-param-docs
Change-Id: I5e73747b726191bc4fc55e6e227892507e185871
Signed-off-by: Gael Chamoulaud <gchamoul@redhat.com>
When using version >= 2.2 of the MySQL module, setting up the database
for Keystone 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: I4ba7932d679764576a46ea599499991a5c57fc56
Closes-Bug: 1349316
The mysql class incorrectly defined an Exec collector to match on 'heat-manage
db_sync', which is not a real Exec in the catalog. The collector silently
failed to find this resource and the notify relationship between the database and the
sync command was never created. This changes the collector to match on
heat-dbsync, which is a real exec defined in init.pp.
Change-Id: Icc8ceb25b525ba83e66c719abca31799a4d2d223
Version 2.2+ of the puppetlabs-mysql moudule starts the MySQL database
with the Service resource name mysqld [1]. The puppet-heat module
lists a requirement for a Service resource with name mysql. This will
lead to an undefined resource error.
This patch corrects the dependency.
[1] https://github.com/puppetlabs/puppetlabs-mysql/blob/master/manifests/server/service.pp#L15
Change-Id: I2f60b610eab4d03552352108d0dfd4f2b796fc70
Puppetlabs-mysql has been rewritten to be much
cleaner. This patch adds a new parameter for the
heat mysql and init classes allowing users to use
the new version. Previous behavior will continue
as normal when using the old version (0.9)
Change-Id: I4d268d793740c31493acd5999dd3f8501cc1d281
Previously, the heat::db::mysql class contained a dependency on
mysql::server. This dependency is unneeded since mysql::db requires
mysql::config, which depends on mysql::server. Additionally, the
mysql::server dependency causes MYSQL HA installations such as
Galera to fail. Lastly, this aligns the class more closely with
the other [OPENSTACK_SERVICE]::db::mysql classes.
Change-Id: Ie6c4d3c8aaa531502bc5b9cd66a547f1f506385f
In the origin heat::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 heat::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
heat::db::mysql::host_access
Add heat_db_mysql_spec for related test.
Fix bug 1206444
Change-Id: Iac6a32fb614c9ad19f9eaa3aaa883cb3bf9aa2ef