From d136eb4cbdd6d99509b22666964a21c5ab5e455a Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Tue, 11 Feb 2014 08:47:15 -0800 Subject: [PATCH] mon: allow firefly crush tunables to be selected Signed-off-by: Sage Weil --- qa/workunits/cephtool/test.sh | 2 ++ src/mon/MonCommands.h | 2 +- src/mon/OSDMonitor.cc | 2 ++ src/test/pybind/test_ceph_argparse.py | 3 ++- 4 files changed, 7 insertions(+), 2 deletions(-) diff --git a/qa/workunits/cephtool/test.sh b/qa/workunits/cephtool/test.sh index c6de486364b..f53b0c031b9 100755 --- a/qa/workunits/cephtool/test.sh +++ b/qa/workunits/cephtool/test.sh @@ -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 diff --git a/src/mon/MonCommands.h b/src/mon/MonCommands.h index bff1f2e7b5a..871f678f277 100644 --- a/src/mon/MonCommands.h +++ b/src/mon/MonCommands.h @@ -423,7 +423,7 @@ COMMAND("osd crush reweight " \ "change 's weight to 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 ", "osd", "rw", "cli,rest") COMMAND("osd crush show-tunables", \ "show current crush tunables", "osd", "r", "cli,rest") diff --git a/src/mon/OSDMonitor.cc b/src/mon/OSDMonitor.cc index 8bf63ccdc5a..257a5fcf098 100644 --- a/src/mon/OSDMonitor.cc +++ b/src/mon/OSDMonitor.cc @@ -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") { diff --git a/src/test/pybind/test_ceph_argparse.py b/src/test/pybind/test_ceph_argparse.py index 89cf6c9a6a0..9557131a0e5 100755 --- a/src/test/pybind/test_ceph_argparse.py +++ b/src/test/pybind/test_ceph_argparse.py @@ -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', -- 2.47.3