mon: allow firefly crush tunables to be selected

Signed-off-by: Sage Weil <sage@inktank.com>
This commit is contained in:
Sage Weil 2014-02-11 08:47:15 -08:00
parent e3309bce03
commit d136eb4cbd
4 changed files with 7 additions and 2 deletions

View File

@ -213,6 +213,8 @@ ceph osd crush tunables legacy
ceph osd crush show-tunables | grep argonaut
ceph osd crush tunables bobtail
ceph osd crush show-tunables | grep bobtail
ceph osd crush tunables firefly
ceph osd crush show-tunables | grep firefly
# how do I tell when these are done?
ceph osd scrub 0

View File

@ -423,7 +423,7 @@ COMMAND("osd crush reweight " \
"change <name>'s weight to <weight> in crush map", \
"osd", "rw", "cli,rest")
COMMAND("osd crush tunables " \
"name=profile,type=CephChoices,strings=legacy|argonaut|bobtail|optimal|default", \
"name=profile,type=CephChoices,strings=legacy|argonaut|bobtail|firefly|optimal|default", \
"set crush tunables values to <profile>", "osd", "rw", "cli,rest")
COMMAND("osd crush show-tunables", \
"show current crush tunables", "osd", "r", "cli,rest")

View File

@ -3489,6 +3489,8 @@ bool OSDMonitor::prepare_command(MMonCommand *m)
newcrush.set_tunables_legacy();
} else if (profile == "bobtail") {
newcrush.set_tunables_bobtail();
} else if (profile == "firefly") {
newcrush.set_tunables_firefly();
} else if (profile == "optimal") {
newcrush.set_tunables_optimal();
} else if (profile == "default") {

View File

@ -690,7 +690,8 @@ class TestOSD(TestArgparse):
'2.3']))
def test_crush_tunables(self):
for tunable in ('legacy', 'argonaut', 'bobtail', 'optimal', 'default'):
for tunable in ('legacy', 'argonaut', 'bobtail', 'firefly',
'optimal', 'default'):
self.assert_valid_command(['osd', 'crush', 'tunables',
tunable])
assert_equal({}, validate_command(sigdict, ['osd', 'crush',