mirror of
https://github.com/ceph/ceph
synced 2025-02-22 18:47:18 +00:00
mon: should not take non-tell commands as tell ones
this change addresses a regression introduced bya2c34794dc
. in which, a new flag, 'FLAG_TELL' was added. and it's used to check if a command is "TELL" command. if it is, it's added to the tell/asok command registry and monitor will handle the commands in this registry using asok hooks. but there are some commands whose flag is "HIDDEN". and aftera2c34794dc
, is_tell() takes HIDDEN commands as TELL command. that's why `ceph_test_admin_socket_output --all` fails. because, "mds freeze" is now wrongly considered as a TELL command. but monitor is not able to handle is using the asok hooks. after this change, is_tell() will not mistake "mds freeze" as a TELL command anymore. Signed-off-by: Kefu Chai <kchai@redhat.com>
This commit is contained in:
parent
53066d09ab
commit
2a7b6f161f
@ -35,7 +35,7 @@ struct MonCommand {
|
||||
// in --help output.
|
||||
static const uint64_t FLAG_TELL = (FLAG_NOFORWARD | FLAG_HIDDEN);
|
||||
|
||||
bool has_flag(uint64_t flag) const { return (flags & flag) != 0; }
|
||||
bool has_flag(uint64_t flag) const { return (flags & flag) == flag; }
|
||||
void set_flag(uint64_t flag) { flags |= flag; }
|
||||
void unset_flag(uint64_t flag) { flags &= ~flag; }
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user