From f58adbc887abd4f467b483be953ecce7794255fc Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Wed, 14 Jun 2017 17:04:57 +0200 Subject: Periodically recheck for manifest upload There seems to be some obscure race, perhaps related to tmpfs? --- bbot/agent.cxx | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'bbot/agent.cxx') diff --git a/bbot/agent.cxx b/bbot/agent.cxx index 117840a..d71f7b4 100644 --- a/bbot/agent.cxx +++ b/bbot/agent.cxx @@ -219,9 +219,11 @@ bootstrap_machine (const dir_path& md, // Next the bootstrap process may download additional toolchain // archives, build things, and then upload the result manifest. So on // our side we serve TFTP requests while periodically checking for the - // manifest file. + // manifest file. To workaround some obscure filesystem races (the + // file's mtime/size is updated several seconds later; maybe tmpfs + // issue?), we periodically re-check. // - for (to = bootstrap_to; to != 0; tftpd.serve (to)) + for (to = bootstrap_to; to != 0; tftpd.serve (to, 2)) { if (file_exists (mf)) { @@ -702,9 +704,11 @@ try // Next the worker builds things and then uploads the result manifest. // So on our side we serve TFTP requests while checking for the - // manifest file. + // manifest file. To workaround some obscure filesystem races (the + // file's mtime/size is updated several seconds later; maybe tmpfs + // issue?), we periodically re-check. // - for (to = build_to; to != 0; tftpd.serve (to)) + for (to = build_to; to != 0; tftpd.serve (to, 2)) { if (file_exists (rf)) { -- cgit v1.1