From 008d61046758226800a71aa7e9988e692cdb461b Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Fri, 26 Jun 2015 21:06:35 +0200 Subject: [PATCH] getQueuedBuilds(): Don't catch errors while loading a build from the queue Otherwise we never recover from reset daemon connections, e.g. hydra-queue-runner[16106]: while loading build 599369: cannot start daemon worker: reading from file: Connection reset by peer hydra-queue-runner[16106]: while loading build 599236: writing to file: Broken pipe ... The error is now handled queueMonitor(), causing the next call to queueMonitorLoop() to create a new connection. --- src/hydra-queue-runner/hydra-queue-runner.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/hydra-queue-runner/hydra-queue-runner.cc b/src/hydra-queue-runner/hydra-queue-runner.cc index 9a1c2652..3ae69813 100644 --- a/src/hydra-queue-runner/hydra-queue-runner.cc +++ b/src/hydra-queue-runner/hydra-queue-runner.cc @@ -719,8 +719,8 @@ void State::getQueuedBuilds(Connection & conn, std::shared_ptr store, try { createBuild(build); } catch (Error & e) { - printMsg(lvlError, format("while loading build %1%: %2%") % build->id % e.what()); - continue; // FIXME: retry later? + e.addPrefix(format("while loading build %1%: ") % build->id); + throw; } /* Add the new runnable build steps to ‘runnable’ and wake up