Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mon: Add ceph osd get-require-min-compat-client command #19015

Merged
merged 1 commit into from Feb 28, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions qa/workunits/cephtool/test.sh
Expand Up @@ -1410,6 +1410,7 @@ function test_mon_osd()
# require-min-compat-client
expect_false ceph osd set-require-min-compat-client dumpling # firefly tunables
ceph osd set-require-min-compat-client luminous
ceph osd get-require-min-compat-client | grep luminous
ceph osd dump | grep 'require_min_compat_client luminous'

#
Expand Down
3 changes: 3 additions & 0 deletions src/mon/MonCommands.h
Expand Up @@ -709,6 +709,9 @@ COMMAND("osd set-nearfull-ratio " \
"name=ratio,type=CephFloat,range=0.0|1.0", \
"set usage ratio at which OSDs are marked near-full",
"osd", "rw", "cli,rest")
COMMAND("osd get-require-min-compat-client",
"get the minimum client version we will maintain compatibility with",
"osd", "r", "cli,rest")
COMMAND("osd set-require-min-compat-client " \
"name=version,type=CephString " \
"name=sure,type=CephChoices,strings=--yes-i-really-mean-it,req=false", \
Expand Down
5 changes: 5 additions & 0 deletions src/mon/OSDMonitor.cc
Expand Up @@ -4940,6 +4940,11 @@ bool OSDMonitor::preprocess_command(MonOpRequestRef op)
rdata.append(ss.str());
ss.str("");
}
} else if (prefix == "osd get-require-min-compat-client") {
ss << ceph_release_name(osdmap.require_min_compat_client) << std::endl;
rdata.append(ss.str());
ss.str("");
goto reply;
} else {
// try prepare update
return false;
Expand Down