Skip to content

Commit

Permalink
Add retries for non transient file transfer errors
Browse files Browse the repository at this point in the history
W/o this patch, Rabbitmq::Install::Rabbitmqadmin/Staging::File[rabbitmqadmin]
/Exec[/var/lib/rabbitmq/rabbitmqadmin]
sometimes could fail the curl command due to transient or connectivity errors.

The solution is:
- For transient errors:
* use timeout param for staging::file
* use --retries , --retry-delay flag for curl command passed to staging::file
- For connectivity errors:
* improve staging module to retry its commands as well, see
  https://github.com/nanliu/puppet-staging/pull/52

Closes-bug: #MODULES-1650

Signed-off-by: Bogdan Dobrelya <bdobrelia@mirantis.com>
  • Loading branch information
Bogdan Dobrelya committed Jan 13, 2015
1 parent cf30101 commit 966e0b5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion manifests/install/rabbitmqadmin.pp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
staging::file { 'rabbitmqadmin':
target => '/var/lib/rabbitmq/rabbitmqadmin',
source => "${protocol}://${default_user}:${default_pass}@localhost:${management_port}/cli/rabbitmqadmin",
curl_option => '-k --noproxy localhost',
curl_option => '-k --noproxy localhost --retry 30 --retry-delay 6',
timeout => '180',
wget_option => '--no-proxy',
require => [
Class['rabbitmq::service'],
Expand Down

0 comments on commit 966e0b5

Please sign in to comment.