summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorIan Wienand <iwienand@redhat.com>2022-08-31 14:50:19 +1000
committerIan Wienand <iwienand@redhat.com>2022-09-14 11:19:40 +1000
commitc54ccda1283cda500ec2e83be2b8769ce261fd7b (patch)
tree69977f65a6808cc6b1cf2cb824a38744adf5158c /doc
parentc9fa64b4db2743e2c8716b2d41675e5c995ef34e (diff)
downloadzuul-c54ccda1283cda500ec2e83be2b8769ce261fd7b.tar.gz
zuul-stream: Add variable to disable writing streaming files
Upon further discussion we recently found another case of leaking console streaming files; if the zuul_console is not running on port 19885, or can not be reached, the streaming spool files will still be leaked. The prior work in I823156dc2bcae91bd6d9770bd1520aa55ad875b4 has the receiving side indicate to the zuul_console daemon that it should remove the spool file. If this doesn't happen, either because the daemon was never there, or it is firewalled off, the streaming spool files are left behind. This modifies the command action plugin to look for a variable "zuul_console_disable" which will indicate to the library running the shell/command task not to write out the spool file at all, as it will not be consumed. It is expected this would be set at a host level in inventory for nodes that you know can not or will not have access to zuul_console daemon. We already have a mechanism to disable this for commands running in a loop; we expand this with a new string type. The advantage of this is it leaves the library/command.py side basically untouched. Documentation is updated, and we cover this with a new test. Change-Id: I0273993c3ece4363098e4bf30bfc4308bb69a8b4
Diffstat (limited to 'doc')
-rw-r--r--doc/source/howtos/nodepool_static.rst28
1 files changed, 22 insertions, 6 deletions
diff --git a/doc/source/howtos/nodepool_static.rst b/doc/source/howtos/nodepool_static.rst
index c10672e7b..163497bcf 100644
--- a/doc/source/howtos/nodepool_static.rst
+++ b/doc/source/howtos/nodepool_static.rst
@@ -69,14 +69,30 @@ Log streaming
The log streaming service enables Zuul to show the live status of
long-running ``shell`` or ``command`` tasks. The server side is setup
by the ``zuul_console:`` task built-in to Zuul's Ansible installation.
-The executor requires the ability to communicate with the job nodes on
-port 19885 for this to work.
+The executor requires the ability to communicate with this server on
+the job nodes via port ``19885`` for this to work.
-The log streaming service may leave files on the static node in the
-format ``/tmp/console-<uuid>-<task_id>-<host>.log`` if jobs are
-interrupted. These may be safely removed after a short period of
-inactivity with a command such as
+The log streaming service spools command output via files on the job
+node in the format ``/tmp/console-<uuid>-<task_id>-<host>.log``. By
+default, it will clean these files up automatically.
+
+Occasionally, a streaming file may be left if a job is interrupted.
+These may be safely removed after a short period of inactivity with a
+command such as
.. code-block:: shell
find /tmp -maxdepth 1 -name 'console-*-*-<host>.log' -mtime +2 -delete
+
+If the executor is unable to reach port ``19885`` (for example due to
+firewall rules), or the ``zuul_console`` daemon can not be run for
+some other reason, the command to clean these spool files will not be
+processed and they may be left behind; on an ephemeral node this is
+not usually a problem, but on a static node these files will persist.
+
+In this situation, , Zuul can be instructed to not to create any spool
+files for ``shell`` and ``command`` tasks via setting
+``zuul_console_disable: True`` (usually via a global host variable in
+inventory). Live streaming of ``shell`` and ``command`` calls will of
+course be unavailable in this case, but no spool files will be
+created.