Make log streaming to executor per-task
Spawning a single reader at the top isn't actually working. In cases
where there are multiple playbooks per host (literally every zuul v3 job
given pre playbooks for git repos), the stamp file was preventing following
playbook from spawning a daemon, but the daemon was only persistent in
the context of a single playbook.
We can't just spawn a new one per playbook without some modifications,
as otherwise the existing already-streamed content would get streamed
again.
Grab the finger streaming code, which accepts an argument as to what to
stream, and re-use it in zuul_console. Combine this with adding a unique
id to each task. That way each task on a host will log to a distinct
logfile, and each callback will stream only that task's log output.
This allows us to join the reader as well, so that we won't get
streaming overlap across tasks.
Change-Id: Ic5eb6c38af698f4ba8b4504aa69170834ec4036a
3 files changed