mirror of
https://github.com/ceph/ceph
synced 2025-02-28 05:22:19 +00:00
Merge pull request #16300 from liewegas/wip-20600
mon: fix hang on deprecated/removed 'pg set_*full_ratio' commands Reviewed-by: Greg Farnum <gfarnum@redhat.com>
This commit is contained in:
commit
7e287a4408
src/mon
@ -125,11 +125,13 @@
|
||||
// note: this should be replaced shortly!
|
||||
COMMAND("pg force_create_pg name=pgid,type=CephPgid", \
|
||||
"force creation of pg <pgid>", "pg", "rw", "cli,rest")
|
||||
COMMAND("pg set_full_ratio name=ratio,type=CephFloat,range=0.0|1.0", \
|
||||
"set ratio at which pgs are considered full", "pg", "rw", "cli,rest")
|
||||
COMMAND("pg set_nearfull_ratio name=ratio,type=CephFloat,range=0.0|1.0", \
|
||||
"set ratio at which pgs are considered nearly full", \
|
||||
"pg", "rw", "cli,rest")
|
||||
COMMAND_WITH_FLAG("pg set_full_ratio name=ratio,type=CephFloat,range=0.0|1.0", \
|
||||
"set ratio at which pgs are considered full", \
|
||||
"pg", "rw", "cli,rest", FLAG(DEPRECATED))
|
||||
COMMAND_WITH_FLAG("pg set_nearfull_ratio " \
|
||||
"name=ratio,type=CephFloat,range=0.0|1.0", \
|
||||
"set ratio at which pgs are considered nearly full", \
|
||||
"pg", "rw", "cli,rest", FLAG(DEPRECATED))
|
||||
|
||||
COMMAND("pg map name=pgid,type=CephPgid", "show mapping of pg to osds", \
|
||||
"pg", "r", "cli,rest")
|
||||
|
@ -558,21 +558,26 @@ version_t PGMonitor::get_trim_to()
|
||||
|
||||
bool PGMonitor::preprocess_query(MonOpRequestRef op)
|
||||
{
|
||||
if (mon->osdmon()->osdmap.require_osd_release >= CEPH_RELEASE_LUMINOUS) {
|
||||
return false;
|
||||
}
|
||||
|
||||
op->mark_pgmon_event(__func__);
|
||||
PaxosServiceMessage *m = static_cast<PaxosServiceMessage*>(op->get_req());
|
||||
dout(10) << "preprocess_query " << *m << " from " << m->get_orig_source_inst() << dendl;
|
||||
dout(10) << "preprocess_query " << *m
|
||||
<< " from " << m->get_orig_source_inst() << dendl;
|
||||
switch (m->get_type()) {
|
||||
case MSG_PGSTATS:
|
||||
if (mon->osdmon()->osdmap.require_osd_release >= CEPH_RELEASE_LUMINOUS) {
|
||||
return true;
|
||||
}
|
||||
return preprocess_pg_stats(op);
|
||||
|
||||
case MSG_MON_COMMAND:
|
||||
if (mon->osdmon()->osdmap.require_osd_release >= CEPH_RELEASE_LUMINOUS) {
|
||||
bufferlist rdata;
|
||||
mon->reply_command(op, -EOPNOTSUPP, "this command is obsolete", rdata,
|
||||
get_last_committed());
|
||||
return true;
|
||||
}
|
||||
return preprocess_command(op);
|
||||
|
||||
|
||||
default:
|
||||
ceph_abort();
|
||||
return true;
|
||||
|
Loading…
Reference in New Issue
Block a user