From 966e0b50223d7e19275af7d0a99328728a31af3c Mon Sep 17 00:00:00 2001 From: Bogdan Dobrelya Date: Tue, 13 Jan 2015 12:36:53 +0100 Subject: [PATCH] Add retries for non transient file transfer errors 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 --- manifests/install/rabbitmqadmin.pp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/manifests/install/rabbitmqadmin.pp b/manifests/install/rabbitmqadmin.pp index a6fad6fd3..5b9f527b9 100644 --- a/manifests/install/rabbitmqadmin.pp +++ b/manifests/install/rabbitmqadmin.pp @@ -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'],