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
This commit is contained in:
parent
5ade08894b
commit
83f9db704c
|
@ -9,8 +9,13 @@
|
||||||
# in the command line between 'glance-manage' and 'db sync'.
|
# in the command line between 'glance-manage' and 'db sync'.
|
||||||
# Defaults to ''
|
# Defaults to ''
|
||||||
#
|
#
|
||||||
|
# [*db_sync_timeout*]
|
||||||
|
# (Optional) Timeout for the execution of the db_sync
|
||||||
|
# Defaults to 300
|
||||||
|
#
|
||||||
class glance::db::sync(
|
class glance::db::sync(
|
||||||
$extra_params = '',
|
$extra_params = '',
|
||||||
|
$db_sync_timeout = 300,
|
||||||
) {
|
) {
|
||||||
|
|
||||||
include glance::deps
|
include glance::deps
|
||||||
|
@ -22,6 +27,7 @@ class glance::db::sync(
|
||||||
refreshonly => true,
|
refreshonly => true,
|
||||||
try_sleep => 5,
|
try_sleep => 5,
|
||||||
tries => 10,
|
tries => 10,
|
||||||
|
timeout => $db_sync_timeout,
|
||||||
logoutput => on_failure,
|
logoutput => on_failure,
|
||||||
subscribe => [
|
subscribe => [
|
||||||
Anchor['glance::install::end'],
|
Anchor['glance::install::end'],
|
||||||
|
|
|
@ -0,0 +1,3 @@
|
||||||
|
---
|
||||||
|
features:
|
||||||
|
- Adds db_sync_timeout parameter to db sync.
|
|
@ -14,6 +14,7 @@ describe 'glance::db::sync' do
|
||||||
:refreshonly => 'true',
|
:refreshonly => 'true',
|
||||||
:try_sleep => 5,
|
:try_sleep => 5,
|
||||||
:tries => 10,
|
:tries => 10,
|
||||||
|
:timeout => 300,
|
||||||
:logoutput => 'on_failure',
|
:logoutput => 'on_failure',
|
||||||
:subscribe => ['Anchor[glance::install::end]',
|
:subscribe => ['Anchor[glance::install::end]',
|
||||||
'Anchor[glance::config::end]',
|
'Anchor[glance::config::end]',
|
||||||
|
@ -26,7 +27,8 @@ describe 'glance::db::sync' do
|
||||||
describe "overriding extra_params" do
|
describe "overriding extra_params" do
|
||||||
let :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
|
end
|
||||||
|
|
||||||
|
@ -37,6 +39,7 @@ describe 'glance::db::sync' do
|
||||||
:refreshonly => 'true',
|
:refreshonly => 'true',
|
||||||
:try_sleep => 5,
|
:try_sleep => 5,
|
||||||
:tries => 10,
|
:tries => 10,
|
||||||
|
:timeout => 750,
|
||||||
:logoutput => 'on_failure',
|
:logoutput => 'on_failure',
|
||||||
:subscribe => ['Anchor[glance::install::end]',
|
:subscribe => ['Anchor[glance::install::end]',
|
||||||
'Anchor[glance::config::end]',
|
'Anchor[glance::config::end]',
|
||||||
|
|
Loading…
Reference in New Issue