
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. The proposed change adds a configuration option db_sync_timeout which maintains the Puppet default of 300 but allows TripleO to change the timeout to something higher. Change-Id: I6b30a4d9e3ca25d9a473e4eb614a8769fa4567e7
42 lines
1018 B
Puppet
42 lines
1018 B
Puppet
#
|
|
# Class to execute neutron dbsync
|
|
#
|
|
# ==Parameters
|
|
#
|
|
# [*extra_params*]
|
|
# (optional) String of extra command line parameters to append
|
|
# to the neutron-db-manage upgrade heads command. These will be
|
|
# inserted in the command line between 'neutron-db-manage' and
|
|
# 'upgrade heads'.
|
|
# Defaults to ''
|
|
#
|
|
# [*db_sync_timeout*]
|
|
# (optional) Timeout for the execution of the db_sync
|
|
# Defaults to 300
|
|
#
|
|
#
|
|
class neutron::db::sync(
|
|
$extra_params = '',
|
|
$db_sync_timeout = 300,
|
|
) {
|
|
|
|
include ::neutron::deps
|
|
include ::neutron::params
|
|
|
|
exec { 'neutron-db-sync':
|
|
command => "neutron-db-manage ${extra_params} upgrade heads",
|
|
path => '/usr/bin',
|
|
refreshonly => true,
|
|
try_sleep => 5,
|
|
tries => 10,
|
|
timeout => $db_sync_timeout,
|
|
logoutput => on_failure,
|
|
subscribe => [
|
|
Anchor['neutron::install::end'],
|
|
Anchor['neutron::config::end'],
|
|
Anchor['neutron::dbsync::begin']
|
|
],
|
|
notify => Anchor['neutron::dbsync::end'],
|
|
}
|
|
}
|