Files
puppet-mistral/manifests/db/sync.pp
Takashi Kajinami ee5543338a Prepare for voxpupuli-puppet-lint-plugins
Fix new lint errors detected when full of the voxpupili lint plugins
are enabled.

Change-Id: Ibe6971f658bfef90a80600922be92506f9f96d35
Signed-off-by: Takashi Kajinami <kajinamit@oss.nttdata.com>
2025-08-19 23:37:47 +09:00

51 lines
1.3 KiB
Puppet

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