]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
mon: MDSMonitor: wait for osdmon to be writable when requesting proposal 2744/head
authorJoao Eduardo Luis <joao@redhat.com>
Fri, 17 Oct 2014 18:08:20 +0000 (19:08 +0100)
committerJoao Eduardo Luis <joao@redhat.com>
Fri, 17 Oct 2014 18:08:20 +0000 (19:08 +0100)
commit2ae1cba595d9c56a0a4c534b34fe25250e7eb2d5
tree0d68757e59d53e63164d2233d5ccd0bb0249b844
parent0dd473cbad4f9ea403fe60badffdc6da4dd3aa3c
mon: MDSMonitor: wait for osdmon to be writable when requesting proposal

Otherwise we may end up requesting the osdmon to propose while it is
mid-proposal.  We can't simply return EAGAIN to the user either because
then we would have to expect the user to be able to successfully race
with the whole cluster in finding a window in which 'mds fs new' command
would succeed -- which is not a realistic expectation.  Having the
command to osdmon()->wait_for_writable() guarantees that the command
will be added to a queue and that we will, eventually, tend to it.

Fixes: #9794
Signed-off-by: Joao Eduardo Luis <joao@redhat.com>
src/mon/MDSMonitor.cc
src/mon/MDSMonitor.h