diff --git a/manifests/profile/base/swift/ringbuilder.pp b/manifests/profile/base/swift/ringbuilder.pp index 27cf4fe15..3c7b8df90 100644 --- a/manifests/profile/base/swift/ringbuilder.pp +++ b/manifests/profile/base/swift/ringbuilder.pp @@ -92,8 +92,10 @@ class tripleo::profile::base::swift::ringbuilder ( if $step >= 2 and $swift_ring_get_tempurl != '' { exec{'fetch_swift_ring_tarball': path => ['/usr/bin'], - command => "curl --insecure --silent '${swift_ring_get_tempurl}' -o /tmp/swift-rings.tar.gz", - returns => [0, 3] + command => "curl --insecure --silent --retry 3 '${swift_ring_get_tempurl}' -o /tmp/swift-rings.tar.gz", + returns => [0, 3], + timeout => 30, + tries => 3, } ~> exec{'extract_swift_ring_tarball': path => ['/bin'], @@ -155,9 +157,11 @@ class tripleo::profile::base::swift::ringbuilder ( } exec{'upload_swift_ring_tarball': path => ['/usr/bin'], - command => "curl --insecure --silent -X PUT '${$swift_ring_put_tempurl}' --data-binary @/tmp/swift-rings.tar.gz", + command => "curl --insecure --silent --retry 3 -X PUT '${$swift_ring_put_tempurl}' --data-binary @/tmp/swift-rings.tar.gz", require => Exec['create_swift_ring_tarball'], refreshonly => true, + timeout => 30, + tries => 3, } Exec['rebalance_account'] ~> Exec['create_swift_ring_tarball'] diff --git a/releasenotes/notes/swift-ring-curl-retry-1c329d1808b7f02c.yaml b/releasenotes/notes/swift-ring-curl-retry-1c329d1808b7f02c.yaml new file mode 100644 index 000000000..9d3e2bc49 --- /dev/null +++ b/releasenotes/notes/swift-ring-curl-retry-1c329d1808b7f02c.yaml @@ -0,0 +1,8 @@ +--- +fixes: + - | + Retry Swift ring up-/downloads on failures to improve overall + stability during deployments when there are temporary errors. + Retries are executed in case of HTTP errors (for example due to a + temporary issue between the proxy and backend servers) as well as + connection issue to the proxy itself.