diff --git a/zuul/ansible/base/callback/zuul_stream.py b/zuul/ansible/base/callback/zuul_stream.py index aa60d3b678..be407c03d0 100644 --- a/zuul/ansible/base/callback/zuul_stream.py +++ b/zuul/ansible/base/callback/zuul_stream.py @@ -132,6 +132,7 @@ class CallbackModule(default.CallbackModule): def _read_log(self, host, ip, port, log_id, task_name, hosts): self._log("[%s] Starting to log %s for task %s" % (host, log_id, task_name), job=False, executor=True) + logger_retries = 0 while True: try: s = socket.create_connection((ip, port), 5) @@ -152,8 +153,10 @@ class CallbackModule(default.CallbackModule): % (ip, port)) return except Exception: - self._log("[%s] Waiting on logger" % host, - executor=True, debug=True) + if logger_retries % 10 == 0: + self._log("[%s] Waiting on logger" % host, + executor=True, debug=True) + logger_retries += 1 time.sleep(0.1) continue msg = "%s\n" % log_id