From 0830557cd6abcbf5b420d330d18a2c0aa94a6e43 Mon Sep 17 00:00:00 2001 From: Christophe Monniez Date: Thu, 4 Jul 2019 15:06:58 +0200 Subject: [PATCH] [FIX] runbot: avoid "Modules loaded not found in logs" In some conditions, Docker can take a little time to start a container. In that case, if the runbot checks that the container is running before it starts, runbot consider the job as finished. It the tries to grep the logs and, as expected, it does not find the "Modules loaded". With this commit, we consider young builds (less than 15 sec) as running, giving more time to Docker for starting it. --- runbot/models/build.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/runbot/models/build.py b/runbot/models/build.py index 5139193e..61a646a8 100644 --- a/runbot/models/build.py +++ b/runbot/models/build.py @@ -567,6 +567,9 @@ class runbot_build(models.Model): build._log('_schedule', '%s time exceeded (%ss)' % (build.active_step.name if build.active_step else "?", build.job_time)) build._kill(result='killed') continue + elif build.job_time < 15: + _logger.debug('container "%s" seems too take a while to start', build._get_docker_name()) + continue # No job running, make result and select nex job build_values = { 'job_end': now(),