puppet-zaqar/manifests/db/sync.pp
Takashi Kajinami b25f7f6277 Avoid hard-coding OS user/group in each manifest
and replace hard-codes by definition in params.pp .

Change-Id: Iadd122b33ac826902468541263f87176a556bd30
2022-02-21 01:44:32 +09:00

36 lines
798 B
Puppet

#
# Class to execute "zaqar-sql-db-manage upgrade head"
#
# ==Parameters
#
# [*db_sync_timeout*]
# (Optional) Timeout for the execution of the db_sync
# Defaults to 300
#
class zaqar::db::sync(
$db_sync_timeout = 300,
) {
include zaqar::deps
include zaqar::params
exec { 'zaqar-db-sync':
command => 'zaqar-sql-db-manage upgrade head',
path => '/usr/bin',
user => $::zaqar::params::user,
refreshonly => true,
try_sleep => 5,
tries => 10,
timeout => $db_sync_timeout,
logoutput => on_failure,
subscribe => [
Anchor['zaqar::install::end'],
Anchor['zaqar::config::end'],
Anchor['zaqar::dbsync::begin']
],
notify => Anchor['zaqar::dbsync::end'],
tag => 'openstack-db',
}
}