]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
mon: add osdmonitor_prepare_command to the admin socket
authorLoic Dachary <loic@dachary.org>
Wed, 12 Feb 2014 15:49:32 +0000 (16:49 +0100)
committerLoic Dachary <loic@dachary.org>
Thu, 13 Feb 2014 08:52:23 +0000 (09:52 +0100)
commit8dea58843c2fd633c1b9eaf53a19e9294a59aed9
tree8c506c767a03167dc525ba36b49d897076b502bc
parent07c494bd7c633dd66bd0db80243e7708627867aa
mon: add osdmonitor_prepare_command to the admin socket

It provides a developer path allowing functional tests to modify the
pending OSDMap without triggering a PaxosProposal.

It can be used as follows:

   echo '{"prefix":"osdmonitor_prepare_command","prepare":"osd crush tunables","profile":"bobtail"}' | nc -U out/mon.a.asok

It will transform the command into:

  {"prefix":"osd crush tunables","profile":"bobtail"}

and feed it to OSDMonitor::prepare_command_impl(). The pending OSDMap won't
be proposed because it short circuit PaxosService::dispatch. It will,
however, be proposed next time PaxosService::dispatch() gets a chance.

It cannot be used via the ceph command line.

Signed-off-by: Loic Dachary <loic@dachary.org>
src/mon/Monitor.cc
src/mon/Monitor.h