The flag will indicate that a command should be sent to ceph-mgr
instead of ceph-mon (rados_mgr_command instead of
rados_mon_command).
For legacy clients, we'll have to make the mon forward the message
on behalf of the client.
Signed-off-by: Sage Weil <sage@redhat.com>
* NOFORWARD - command may not be forwarded
* OBSOLETE - command is considered obsolete
* DEPRECATED - command is considered deprecated
+ * MGR - command goes to ceph-mgr (for luminous+)
*
* A command should always be first considered DEPRECATED before being
* considered OBSOLETE, giving due consideration to users and conforming
static const uint64_t FLAG_NOFORWARD = 1 << 0;
static const uint64_t FLAG_OBSOLETE = 1 << 1;
static const uint64_t FLAG_DEPRECATED = 1 << 2;
-
+ static const uint64_t FLAG_MGR = 1 << 3;
+
bool has_flag(uint64_t flag) const { return (flags & flag) != 0; }
void set_flag(uint64_t flag) { flags |= flag; }
void unset_flag(uint64_t flag) { flags &= ~flag; }
return has_flag(MonCommand::FLAG_DEPRECATED);
}
+ bool is_mgr() const {
+ return has_flag(MonCommand::FLAG_MGR);
+ }
+
static void encode_array(const MonCommand *cmds, int size, bufferlist &bl) {
ENCODE_START(2, 1, bl);
uint16_t s = size;