From 4985a9ddfca1510fc612a6d115dc00e8bdba229d Mon Sep 17 00:00:00 2001 From: Sebastian Wagner Date: Mon, 11 May 2020 13:48:19 +0200 Subject: [PATCH] doc/dev/cephadm: Note regarding network calls form CLI handlers Signed-off-by: Sebastian Wagner --- doc/dev/cephadm.rst | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/doc/dev/cephadm.rst b/doc/dev/cephadm.rst index 2fd475f130092..1784de422968b 100644 --- a/doc/dev/cephadm.rst +++ b/doc/dev/cephadm.rst @@ -85,3 +85,18 @@ When you're done, you can tear down the cluster with:: sudo ../src/ckill.sh # or, sudo ../src/cephadm/cephadm rm-cluster --force --fsid `cat fsid` + +Note regarding network calls from CLI handlers +============================================== + +Executing any cephadm CLI commands like ``ceph orch ls`` will block +the mon command handler thread within the MGR, thus preventing any +concurrent CLI calls. Note that pressing ``^C`` will not resolve this +situation, as *only* the client will be aborted, but not exceution +itself. This means, cephadm will be completely unresonsive, until the +execution of the CLI handler is fully completed. Note that even +``ceph orch ps`` will not respond, while another handler is executed. + +This means, we should only do very few calls to remote hosts synchronously. +As a guideline, cephadm should do at most ``O(1)`` network calls in CLI handlers. +Everything else should be done asynchronously in other threads, like ``serve()``. -- 2.39.5