Makes it easier to identify the command as being related with the
monitor instead of cluster-wide.
This entails adding an exception to module 'mon' in order to have this
command handled by the Monitor class instead of MonmapMonitor (which is
the one traditionally handling 'mon' module commands).
Fixes: #11545
Signed-off-by: Joao Eduardo Luis <joao@suse.de>
"cause compaction of monitor's leveldb storage", \
"mon", "rw", "cli,rest", \
FLAG(NOFORWARD))
+COMMAND_WITH_FLAG("mon scrub",
+ "scrub the monitor stores", \
+ "mon", "rw", "cli,rest", \
+ FLAG(NONE))
/*
return;
}
if (module == "mon" &&
- /* 'mon compact' will be handled by the Monitor class */
- prefix != "mon compact") {
+ /* Let the Monitor class handle the following commands:
+ * 'mon compact'
+ * 'mon scrub'
+ */
+ prefix != "mon compact" &&
+ prefix != "mon scrub") {
monmon()->dispatch(m);
return;
}
return;
}
- if (prefix == "scrub") {
+ if (prefix == "scrub" || prefix == "mon scrub") {
wait_for_paxos_write();
if (is_leader()) {
int r = scrub();