Set timeouts for db upgrade operations

This commit is adding timeout fields to the 2 execs as part of a new
subunit2sql release. The first sets the timeout for the mysqldump to
be 30min which should be sufficient time for that. The timeout for the
actual db upgrade command is disabled however, because there is no
way to safely estimate how long the migration will take.

Change-Id: I7deb7abca9c97186343eb6c3ea30185c23c24c7a
This commit is contained in:
Matthew Treinish 2015-03-13 16:14:53 -04:00
parent d286d9f63d
commit a665f7b970
1 changed files with 2 additions and 0 deletions

View File

@ -46,6 +46,7 @@ class subunit2sql::server (
subscribe => Package['subunit2sql'],
require => File['/etc/subunit2sql-my.cnf'],
refreshonly => true,
timeout => 1800,
}
exec { 'upgrade_subunit2sql_db':
@ -53,5 +54,6 @@ class subunit2sql::server (
path => '/usr/local/bin:/usr/bin:/bin/',
subscribe => Exec['backup_subunit2sql_db'],
refreshonly => true,
timeout => 0,
}
}