From: Sage Weil Date: Thu, 27 Mar 2014 23:39:01 +0000 (-0700) Subject: mon/OSDMonitor: require OSD_CACHEPOOL feature before using tiering features X-Git-Tag: v0.79~73^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=c64d03d0a809f0922f5c4f0c4ef8691bad7f1c42;p=ceph.git mon/OSDMonitor: require OSD_CACHEPOOL feature before using tiering features The OSDs need to support this feature before we allow users to turn it on. This is similar to what the erasure pool support does. Signed-off-by: Sage Weil --- diff --git a/src/mon/OSDMonitor.cc b/src/mon/OSDMonitor.cc index be55befdd341..b721ddd83c2f 100644 --- a/src/mon/OSDMonitor.cc +++ b/src/mon/OSDMonitor.cc @@ -4756,6 +4756,11 @@ done: get_last_committed() + 1)); return true; } else if (prefix == "osd tier add") { + err = check_cluster_features(CEPH_FEATURE_OSD_CACHEPOOL, ss); + if (err == -EAGAIN) + goto wait; + if (err) + goto reply; string poolstr; cmd_getval(g_ceph_context, cmdmap, "pool", poolstr); int64_t pool_id = osdmap.lookup_pg_pool_name(poolstr); @@ -4864,6 +4869,11 @@ done: get_last_committed() + 1)); return true; } else if (prefix == "osd tier set-overlay") { + err = check_cluster_features(CEPH_FEATURE_OSD_CACHEPOOL, ss); + if (err == -EAGAIN) + goto wait; + if (err) + goto reply; string poolstr; cmd_getval(g_ceph_context, cmdmap, "pool", poolstr); int64_t pool_id = osdmap.lookup_pg_pool_name(poolstr); @@ -4930,6 +4940,11 @@ done: get_last_committed() + 1)); return true; } else if (prefix == "osd tier cache-mode") { + err = check_cluster_features(CEPH_FEATURE_OSD_CACHEPOOL, ss); + if (err == -EAGAIN) + goto wait; + if (err) + goto reply; string poolstr; cmd_getval(g_ceph_context, cmdmap, "pool", poolstr); int64_t pool_id = osdmap.lookup_pg_pool_name(poolstr); @@ -4961,6 +4976,11 @@ done: get_last_committed() + 1)); return true; } else if (prefix == "osd tier add-cache") { + err = check_cluster_features(CEPH_FEATURE_OSD_CACHEPOOL, ss); + if (err == -EAGAIN) + goto wait; + if (err) + goto reply; string poolstr; cmd_getval(g_ceph_context, cmdmap, "pool", poolstr); int64_t pool_id = osdmap.lookup_pg_pool_name(poolstr);