Browse Source

Allow db sync timeouts to be configurable

As Openstack projects continue to have longer database migration
chains, the Puppet default timeout of 300 seconds for an execution
is becoming too short a duration on some hardware, leading to timeouts.
As projects continue to add more migration scripts without pruning
the base, timeouts will continue to become more frequent unless
this time can be expanded.

Change-Id: Icd6698d7b15344b7ab1c14aad08ebc1cd61346f6
Closes-Bug: #1904962
changes/88/763688/1
ZhongShengping 9 months ago
parent
commit
83f9db704c
  1. 8
      manifests/db/sync.pp
  2. 3
      releasenotes/notes/add_db_sync_timeout-bdc2f73a51104c30.yaml
  3. 5
      spec/classes/glance_db_sync_spec.rb

8
manifests/db/sync.pp

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

3
releasenotes/notes/add_db_sync_timeout-bdc2f73a51104c30.yaml

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

5
spec/classes/glance_db_sync_spec.rb

@ -14,6 +14,7 @@ describe 'glance::db::sync' do
:refreshonly => 'true',
:try_sleep => 5,
:tries => 10,
:timeout => 300,
:logoutput => 'on_failure',
:subscribe => ['Anchor[glance::install::end]',
'Anchor[glance::config::end]',
@ -26,7 +27,8 @@ describe 'glance::db::sync' do
describe "overriding extra_params" do
let :params do
{
:extra_params => '--config-file /etc/glance/glance.conf',
:extra_params => '--config-file /etc/glance/glance.conf',
:db_sync_timeout => 750,
}
end
@ -37,6 +39,7 @@ describe 'glance::db::sync' do
:refreshonly => 'true',
:try_sleep => 5,
:tries => 10,
:timeout => 750,
:logoutput => 'on_failure',
:subscribe => ['Anchor[glance::install::end]',
'Anchor[glance::config::end]',

Loading…
Cancel
Save