]> git.apps.os.sepia.ceph.com Git - teuthology.git/commit
teuthology/task/install: add stdin-killer helper 1846/head
authorPatrick Donnelly <pdonnell@redhat.com>
Thu, 18 May 2023 13:24:57 +0000 (09:24 -0400)
committerPatrick Donnelly <pdonnell@redhat.com>
Wed, 7 Jun 2023 16:21:13 +0000 (12:21 -0400)
commit0126a074c2ae4f1a88d98e21ff4be1c75df9b8e0
tree5c3992bcac46c553752e456f1d30940fd46af557
parent8cdb1f5b679bb2c3dfa7171bc2e3186aa7f0a6ad
teuthology/task/install: add stdin-killer helper

This helper tool runs commands which may or may not take data on stdin.
Like "daemon-helper", if stdin signals EOF, stdin-killer will kill the
command but only as a last resort. It forwards EOF to the command by
closing the command's stdin (pipe) and then waiting a configurable
amount of time for the command to gracefully exit.

Additionally, if stdout or stderr are hung up -- i.e. the ssh parent
process has terminated -- then stdin-killer also detects this and
initiates the graceful shutdown of the command. This is something
daemon-helper does not do.

In general, this tool is a superior replacement of the daemon-helper
tool because you can write to the command's stdin normally.

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
setup.cfg
teuthology/task/install/bin/stdin-killer [new file with mode: 0755]
teuthology/task/install/util.py