summaryrefslogtreecommitdiff
path: root/zuul/ansible
diff options
context:
space:
mode:
authorAlbin Vass <albin.vass@zenseact.com>2022-03-11 13:47:10 +0100
committerAlbin Vass <albin.vass@zenseact.com>2022-03-11 13:51:49 +0100
commit1607143b213db0d63ab93389dda9939d3bcde7ec (patch)
tree3c99551f46c8f198c07d4496241dcf3ccb951495 /zuul/ansible
parentc41139d904ab011a22ec67aee145d15e3fa54238 (diff)
downloadzuul-1607143b213db0d63ab93389dda9939d3bcde7ec.tar.gz
Don't stream async tasks
async tasks is causing zuul_stream.py to hang for 30 seconds before timing out all log streaming threads. This stops zuul_stream.py from streaming logs for async tasks. Change-Id: I86098b0788fdd87593e3c68d04953ede7607432b
Diffstat (limited to 'zuul/ansible')
-rw-r--r--zuul/ansible/base/callback/zuul_stream.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/zuul/ansible/base/callback/zuul_stream.py b/zuul/ansible/base/callback/zuul_stream.py
index be407c03d..09cc16621 100644
--- a/zuul/ansible/base/callback/zuul_stream.py
+++ b/zuul/ansible/base/callback/zuul_stream.py
@@ -255,6 +255,12 @@ class CallbackModule(default.CallbackModule):
else:
task_name = task.get_name().strip()
+ if task.loop:
+ # Don't try to stream from loops
+ return
+ if task.async_val:
+ # Don't try to stream from async tasks
+ return
if task.action in ('command', 'shell'):
play_vars = self._play._variable_manager._hostvars
@@ -270,9 +276,6 @@ class CallbackModule(default.CallbackModule):
if ip in ('localhost', '127.0.0.1'):
# Don't try to stream from localhost
continue
- if task.loop:
- # Don't try to stream from loops
- continue
if play_vars[host].get('ansible_connection') in ('winrm',):
# The winrm connections don't support streaming for now
continue