Merge "Allow db sync timeouts to be configurable"
This commit is contained in:
commit
40e0286385
@ -10,8 +10,14 @@
|
|||||||
# 'upgrade heads'.
|
# 'upgrade heads'.
|
||||||
# Defaults to ''
|
# Defaults to ''
|
||||||
#
|
#
|
||||||
|
# [*db_sync_timeout*]
|
||||||
|
# (optional) Timeout for the execution of the db_sync
|
||||||
|
# Defaults to 300
|
||||||
|
#
|
||||||
|
#
|
||||||
class neutron::db::sync(
|
class neutron::db::sync(
|
||||||
$extra_params = '',
|
$extra_params = '',
|
||||||
|
$db_sync_timeout = 300,
|
||||||
) {
|
) {
|
||||||
|
|
||||||
include ::neutron::deps
|
include ::neutron::deps
|
||||||
@ -23,6 +29,7 @@ class neutron::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['neutron::install::end'],
|
Anchor['neutron::install::end'],
|
||||||
|
@ -0,0 +1,3 @@
|
|||||||
|
---
|
||||||
|
features:
|
||||||
|
- Adds db_sync_timeout parameter to neutron db sync
|
@ -11,6 +11,7 @@ describe 'neutron::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[neutron::install::end]',
|
:subscribe => ['Anchor[neutron::install::end]',
|
||||||
'Anchor[neutron::config::end]',
|
'Anchor[neutron::config::end]',
|
||||||
@ -33,6 +34,31 @@ describe 'neutron::db::sync' do
|
|||||||
:refreshonly => 'true',
|
:refreshonly => 'true',
|
||||||
:try_sleep => 5,
|
:try_sleep => 5,
|
||||||
:tries => 10,
|
:tries => 10,
|
||||||
|
:timeout => 300,
|
||||||
|
:logoutput => 'on_failure',
|
||||||
|
:subscribe => ['Anchor[neutron::install::end]',
|
||||||
|
'Anchor[neutron::config::end]',
|
||||||
|
'Anchor[neutron::dbsync::begin]'],
|
||||||
|
:notify => 'Anchor[neutron::dbsync::end]',
|
||||||
|
)
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
|
describe "overriding db_sync_timeout" do
|
||||||
|
let :params do
|
||||||
|
{
|
||||||
|
:db_sync_timeout => 750,
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
|
it {
|
||||||
|
is_expected.to contain_exec('neutron-db-sync').with(
|
||||||
|
:command => 'neutron-db-manage upgrade heads',
|
||||||
|
:path => '/usr/bin',
|
||||||
|
:refreshonly => 'true',
|
||||||
|
:try_sleep => 5,
|
||||||
|
:tries => 10,
|
||||||
|
:timeout => 750,
|
||||||
:logoutput => 'on_failure',
|
:logoutput => 'on_failure',
|
||||||
:subscribe => ['Anchor[neutron::install::end]',
|
:subscribe => ['Anchor[neutron::install::end]',
|
||||||
'Anchor[neutron::config::end]',
|
'Anchor[neutron::config::end]',
|
||||||
|
Loading…
Reference in New Issue
Block a user