
This patch modifies mistral::db::sync so that it runs 'update head' in addition to 'populate'. This brings the mistral "db_sync" class more inline with other Puppet Openstack modules that run DB sync and fixes issues in bootstrapping mistral in that running populate without first having an 'upgrade head' would always fail. Both actions appear to be idempotent so re-running them should be fine. Change-Id: I13f037c3eea944d5f41ced904623e38ce3fcae44
56 lines
1.2 KiB
Puppet
56 lines
1.2 KiB
Puppet
# == Class: mistral::db::postgresql
|
|
#
|
|
# Class that configures postgresql for mistral
|
|
# Requires the Puppetlabs postgresql module.
|
|
#
|
|
# === Parameters
|
|
#
|
|
# [*password*]
|
|
# (Required) Password to connect to the database.
|
|
#
|
|
# [*dbname*]
|
|
# (Optional) Name of the database.
|
|
# Defaults to 'mistral'.
|
|
#
|
|
# [*user*]
|
|
# (Optional) User to connect to the database.
|
|
# Defaults to 'mistral'.
|
|
#
|
|
# [*encoding*]
|
|
# (Optional) The charset to use for the database.
|
|
# Default to undef.
|
|
#
|
|
# [*privileges*]
|
|
# (Optional) Privileges given to the database user.
|
|
# Default to 'ALL'
|
|
#
|
|
# == Dependencies
|
|
#
|
|
# == Examples
|
|
#
|
|
# == Authors
|
|
#
|
|
# == Copyright
|
|
#
|
|
class mistral::db::postgresql(
|
|
$password,
|
|
$dbname = 'mistral',
|
|
$user = 'mistral',
|
|
$encoding = undef,
|
|
$privileges = 'ALL',
|
|
) {
|
|
|
|
Class['mistral::db::postgresql'] -> Service<| title == 'mistral' |>
|
|
|
|
::openstacklib::db::postgresql { 'mistral':
|
|
password_hash => postgresql_password($user, $password),
|
|
dbname => $dbname,
|
|
user => $user,
|
|
encoding => $encoding,
|
|
privileges => $privileges,
|
|
}
|
|
|
|
::Openstacklib::Db::Postgresql['mistral'] ~> Exec<| title == 'mistral-db-sync' |>
|
|
|
|
}
|