]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
pybind/ceph_daemon: add 10s timeout to admin socket client 69833/head
authorNitzan Mordechai <nmordech@ibm.com>
Tue, 30 Jun 2026 10:42:42 +0000 (10:42 +0000)
committerNitzan Mordechai <nmordech@ibm.com>
Tue, 30 Jun 2026 10:46:02 +0000 (10:46 +0000)
commit2e46312e2e6094d44d421d56dc69d50c878beac7
tree521b7fb290f5e8aa09ae549f9abf5daad1098db8
parentfd808e845305a5df64935e12122d4fb47b08ed0d
pybind/ceph_daemon: add 10s timeout to admin socket client

ceph daemon command can hangs indefinitely when the target
daemon's admin socket is unresponsive. do_sockio() creates socket with
no timeout, so sock.recv(4) blocks forever if the daemon is slow to respond,
where AdminSocket::init() creates the socket file before store->mount()
returns).

The AdminSocketClient already uses a 10-second SO_RCVTIMEO / SO_SNDTIMEO.
Align the Python client by calling sock.settimeout(timeout) before connecting.
The default is 10s to match the C++ side; callers can pass timeout=None
to restore the previous blocking behaviour.

Fixes: https://tracker.ceph.com/issues/77743
Signed-off-by: Nitzan Mordechai <nmordech@ibm.com>
src/pybind/ceph_daemon.py