]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
cephadm: fix timeout argument to call function
authorJohn Mulligan <jmulligan@redhat.com>
Mon, 27 Feb 2023 19:38:50 +0000 (14:38 -0500)
committerJohn Mulligan <jmulligan@redhat.com>
Tue, 7 Mar 2023 18:56:42 +0000 (13:56 -0500)
commitcefe44cde8d53d7bfd935435f87205a01d677986
treeb4abb3f7738a86ab4da9aecd7b6671974902ad9a
parent471a017ad86f752f862d6211faa5231567ba78d8
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>
src/cephadm/cephadm.py