]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
mon: forward mgr commands; cap them
authorSage Weil <sage@redhat.com>
Sun, 26 Feb 2017 19:17:38 +0000 (14:17 -0500)
committerSage Weil <sage@redhat.com>
Wed, 29 Mar 2017 15:39:25 +0000 (11:39 -0400)
commit89735b78f67182aa44003e61532ba7e750f14d10
treeaeb001818d36047853438cf042802c6b07f6ae86
parentcc6e568baa6de5cb3900bc89b3a2a7fcba935c57
mon: forward mgr commands; cap them

Put the completions on a finisher to avoid deadlock.
(MgrClient lock is inside mon_lock due to start_command;
completion cannot retake mon_lock while holding MgrClient's
internal lock.)

The mon has a cap on the nubmer of client message bytes it hold
in memory.  We do not want to eat those up and DOS the mon
because the mgr is not available and all mgr commands are
blocked.

Define the limit as a fraction of mon_client_bytes to avoid user
misconfiguration.

Return EAGAIN if we hit the limit.

Signed-off-by: Sage Weil <sage@redhat.com>
src/common/config_opts.h
src/mon/Monitor.cc
src/mon/Monitor.h