]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
cephadm: fix timeout argument to call function 52909/head
authorJohn Mulligan <jmulligan@redhat.com>
Mon, 27 Feb 2023 19:38:50 +0000 (14:38 -0500)
committerAdam King <adking@redhat.com>
Wed, 9 Aug 2023 20:42:35 +0000 (16:42 -0400)
commit809c744655dbed8091b8ccfa0efdc4826b7d3735
tree84890bf579978beb5055d01d4f0175b0eac6c99b
parentdb88f35068299a02b464d5adee5be2e3aa13b9d5
cephadm: fix timeout argument to call function

The timeout argument to call function, for executing sub-processes, did
not function - this patch makes timeout work as (probably) intended.
Use the `process.communicate()` method rather than `tee` functions to
handle IO collection. Since no logging is done until after the exit code
is known the tee calls are not necessary. Add calls to kill the child
process when the time out occurs. This helps prevent event loop "leaks"
that generate python warnings.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
(cherry picked from commit cefe44cde8d53d7bfd935435f87205a01d677986)
src/cephadm/cephadm