Retry scp at higher level
@@ -5974,6 +5974,7 @@ HOSTS
ssh_key = node.ssh_key
ip = node.private_ip
Djinn.log_debug("Trying #{ip}:#{app_path} for the application.")
+ RETRIES.downto(0) {
begin
HelperFunctions.scp_file(app_path, app_path, ip, ssh_key, true)
if File.exists?(app_path)
@@ -5987,6 +5988,8 @@ HOSTS
end
# Removing possibly corrupted, or partially downloaded tarball.
FileUtils.rm_rf(app_path)
+ Kernel.sleep(SMALL_WAIT)
+ }
Djinn.log_warn("Unable to get the application from #{ip}:#{app_path}: scp failed.")
}
Djinn.log_error("Unable to get the application from any node.")
