]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
mon: noforward flag for commands that are not supposed to be forwarded
authorMykola Golub <mgolub@mirantis.com>
Wed, 21 Jan 2015 13:47:25 +0000 (15:47 +0200)
committerSage Weil <sage@redhat.com>
Mon, 9 Feb 2015 06:12:55 +0000 (22:12 -0800)
commitac9d75c471e1bbd28464ee596ffcd1b750333148
tree0b29e5bee369dace1fa0c0dbf3b192acfc5b1ba1
parent3ff482130727e7da5f4d31d59c0cf648c3bb5515
mon: noforward flag for commands that are not supposed to be forwarded

For not a monitor leader, if a received command is not supported
locally, but is supported by the leader, it is forwarded to the
leader.

For some commands that may have undesirable behaviour. E.g. for the
recently added "ceph tell mon.x version", if the mon.x is not a leader
and does not support "version" command yet, but the leader does, the
user will receive the version of the leader, and can't be actually
sure about a non leader version.

Fix this by adding noforward flag to commands that are not supposed to
be forwarded. Set the flag for "version" command. Although there are
other non-forwardable commands (like injectargs) it is not necessary
to add the flag to them, as the commands are too old to suffer from
the describe problem.

Signed-off-by: Mykola Golub <mgolub@mirantis.com>
src/mon/MonCommands.h
src/mon/Monitor.cc
src/mon/Monitor.h