Merge "Allow db sync timeouts to be configurable"

This commit is contained in:
Zuul 2020-12-20 05:32:54 +00:00 committed by Gerrit Code Review
commit 6277db3e3b
3 changed files with 15 additions and 3 deletions

View File

@ -8,8 +8,13 @@
# to the glare-db-manage command.
# Defaults to ''
#
# [*db_sync_timeout*]
# (Optional) Timeout for the execution of the db_sync
# Defaults to 300
#
class glare::db::sync(
$extra_params = '',
$extra_params = '',
$db_sync_timeout = 300,
) {
include glare::deps
@ -21,6 +26,7 @@ class glare::db::sync(
refreshonly => true,
try_sleep => 5,
tries => 10,
timeout => $db_sync_timeout,
logoutput => on_failure,
subscribe => [
Anchor['glare::install::end'],

View File

@ -0,0 +1,3 @@
---
features:
- Adds db_sync_timeout parameter to db sync.

View File

@ -14,6 +14,7 @@ describe 'glare::db::sync' do
:refreshonly => 'true',
:try_sleep => 5,
:tries => 10,
:timeout => 300,
:logoutput => 'on_failure',
:subscribe => ['Anchor[glare::install::end]',
'Anchor[glare::config::end]',
@ -23,10 +24,11 @@ describe 'glare::db::sync' do
)
end
describe "overriding extra_params" do
describe "overriding params" do
let :params do
{
:extra_params => '--config-file /etc/glare/glare.conf',
:extra_params => '--config-file /etc/glare/glare.conf',
:db_sync_timeout => 750,
}
end
@ -38,6 +40,7 @@ describe 'glare::db::sync' do
:refreshonly => 'true',
:try_sleep => 5,
:tries => 10,
:timeout => 750,
:logoutput => 'on_failure',
:subscribe => ['Anchor[glare::install::end]',
'Anchor[glare::config::end]',