Files
puppet-cloudkitty/manifests/db/sync.pp
ZhongShengping 4f90fa0866 Add 'openstack-db' tag to db-sync Exec resource
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: Id9554154320aa7986f66119dac2f1f3174583616
Closes-Bug: #1755102
2018-03-12 16:33:06 +08:00

34 lines
823 B
Puppet

#
# Class to execute cloudkitty-manage db_sync
#
# == Parameters
#
# [*extra_params*]
# (optional) String of extra command line parameters to append
# to the cloudkitty-dbsync command.
# Defaults to undef
#
class cloudkitty::db::sync(
$extra_params = undef,
) {
include ::cloudkitty::deps
exec { 'cloudkitty-db-sync':
command => "cloudkitty-dbsync upgrade ${extra_params}",
path => [ '/bin', '/usr/bin', ],
user => 'cloudkitty',
refreshonly => true,
try_sleep => 5,
tries => 10,
logoutput => on_failure,
subscribe => [
Anchor['cloudkitty::install::end'],
Anchor['cloudkitty::config::end'],
Anchor['cloudkitty::dbsync::begin']
],
notify => Anchor['cloudkitty::dbsync::end'],
tag => 'openstack-db',
}
}