]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
librados: timeout on mgr_command() 21832/head
authorKefu Chai <kchai@redhat.com>
Fri, 4 May 2018 08:11:53 +0000 (16:11 +0800)
committerKefu Chai <kchai@redhat.com>
Sat, 5 May 2018 11:04:20 +0000 (19:04 +0800)
commit0ab9b101c66b69086db058f11a947de9dba718d6
treec79637999941142a4bc16cc0b1708789e3233a53
parentc8156b911751873c375163d6ffea940a7bfa561c
librados: timeout on mgr_command()

because the mgrclient will be waiting for the mgrmap if the mgrmap
is not available, when the client is about to send a mgr command.
and monitor will drop the subscription requests if the client does not
have enough cap for reading mon, so unlike mon commands, the client
won't get an EACCES return code in this case.

in this change, a timeout machinary is introduced. and the client
will wait for "rados-mon-op-timeout" before it gives up. if this
setting is 0, it will wait forever.

Fixes: https://tracker.ceph.com/issues/23627
Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit eaa1179965c840c0f935c570e146395583f198b6)
qa/workunits/mon/caps.sh
src/ceph.in
src/common/Cond.h
src/librados/RadosClient.cc