Files
puppet-gnocchi/manifests/db/sync.pp
Takashi Kajinami 8fbaed2a43 Prepare for new lint plugins
This fixes a few lint warnings/errors detected by the following plugins
we aim to enable soon.
 - puppet-lint-file_ensure-check
 - puppet-lint-trailing_comma-check
 - puppet-lint-topscope-variable-check

Change-Id: I438e1cdb3d275a364718fa0f924ab62f1045ca0f
Signed-off-by: Takashi Kajinami <kajinamit@oss.nttdata.com>
2025-08-15 20:10:04 +09:00

44 lines
1.0 KiB
Puppet

#
# Class to execute "gnocchi-dbsync"
#
# [*user*]
# (Optional) User to run dbsync command.
# Defaults to $gnocchi::params::user
#
# [*extra_opts*]
# (Optional) String of extra command line parameters to append
# to the gnocchi-db-sync command.
# Defaults to undef
#
# [*db_sync_timeout*]
# (Optional) Timeout for the execution of the db_sync
# Defaults to 300
#
class gnocchi::db::sync (
$user = $gnocchi::params::user,
$extra_opts = undef,
$db_sync_timeout = 300,
) inherits gnocchi::params {
include gnocchi::deps
exec { 'gnocchi-db-sync':
command => "gnocchi-upgrade ${extra_opts}",
path => '/usr/bin',
refreshonly => true,
user => $user,
try_sleep => 5,
tries => 10,
timeout => $db_sync_timeout,
logoutput => on_failure,
subscribe => [
Anchor['gnocchi::install::end'],
Anchor['gnocchi::config::end'],
Anchor['gnocchi::dbsync::begin']
],
notify => Anchor['gnocchi::dbsync::end'],
tag => 'openstack-db',
}
}