Files
puppet-glance/manifests/db/sync.pp
ZhongShengping e3b9d19cbf 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: I0a7d0859d2052e5a8b4805e82e4370057bedf0b2
Closes-Bug: #1755102
2018-03-12 16:33:07 +08:00

37 lines
880 B
Puppet

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