diff --git a/manifests/db/sync.pp b/manifests/db/sync.pp index 8c579305..f320e7cb 100644 --- a/manifests/db/sync.pp +++ b/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'], diff --git a/releasenotes/notes/add_db_sync_timeout-bdc2f73a51104c30.yaml b/releasenotes/notes/add_db_sync_timeout-bdc2f73a51104c30.yaml new file mode 100644 index 00000000..233445f6 --- /dev/null +++ b/releasenotes/notes/add_db_sync_timeout-bdc2f73a51104c30.yaml @@ -0,0 +1,3 @@ +--- +features: + - Adds db_sync_timeout parameter to db sync. diff --git a/spec/classes/glance_db_sync_spec.rb b/spec/classes/glance_db_sync_spec.rb index 78bdb190..2ebaeeef 100644 --- a/spec/classes/glance_db_sync_spec.rb +++ b/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]',