Commit 15b7cea6 authored by Mike Hibler's avatar Mike Hibler
Browse files

Do one retry of the put if the mserver returns TRYAGAIN.

Let's see if this helps with the seemingly transient failure to open
the output file we get on CloudLab Utah. Maybe a transient AMD-related
failure?
parent e1a78581
/*
* Copyright (c) 2010-2014 University of Utah and the Flux Group.
* Copyright (c) 2010-2015 University of Utah and the Flux Group.
*
* {{{EMULAB-LICENSE
*
......@@ -182,6 +182,9 @@ main(int argc, char **argv)
idletimeout = 0;
if (imageid) {
int retried = 0;
again:
if (!put_request(imageid, ntohl(msip.s_addr), msport, proxyip,
filesize, mtime, timeout, askonly, timo,
&reply))
......@@ -193,6 +196,20 @@ main(int argc, char **argv)
exit(0);
}
if (reply.error) {
/*
* XXX right now the master server returns this if
* the uploader dies immediately for any reason;
* so we don't know if it is really a transient
* condition. So, we just retry once. Note that
* the server will have waited a couple of seconds
* before replying to us, so no need to wait further.
*/
if (reply.error == MS_ERROR_TRYAGAIN && !retried) {
FrisWarning("%s: retrying put...", imageid);
retried++;
goto again;
}
/*
* XXX this is a bit of a hack: MS_ERROR_TOOBIG
* returns the max allowed size as a courtesy so
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment