From c2e8f8b1cd7e20bfaa42a607bde28131d0c2bcb0 Mon Sep 17 00:00:00 2001 From: Nathan Cutler Date: Tue, 19 May 2020 22:40:55 +0200 Subject: [PATCH 1/2] mon/OSDMonitor: do not tell user 'proxy' cache-mode allowed The 'proxy' cache-mode is deprecated and can no longer be used. Signed-off-by: Nathan Cutler --- src/mon/OSDMonitor.cc | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/mon/OSDMonitor.cc b/src/mon/OSDMonitor.cc index 498059d919bb0..a69e9b3a0f3b5 100644 --- a/src/mon/OSDMonitor.cc +++ b/src/mon/OSDMonitor.cc @@ -13078,8 +13078,6 @@ bool OSDMonitor::prepare_command_impl(MonOpRequestRef op, ss << "unable to set cache-mode '" << pg_pool_t::get_cache_mode_name(mode) << "' on a '" << pg_pool_t::get_cache_mode_name(p->cache_mode) << "' pool; only '" - << pg_pool_t::get_cache_mode_name(pg_pool_t::CACHEMODE_PROXY) - << "','" << pg_pool_t::get_cache_mode_name(pg_pool_t::CACHEMODE_READPROXY) << "' allowed."; err = -EINVAL; From 4f0cecbadd56b0d28adf49a88a9044fea24f6eba Mon Sep 17 00:00:00 2001 From: Nathan Cutler Date: Tue, 19 May 2020 22:05:22 +0200 Subject: [PATCH 2/2] qa/cephtool: clean up after removal of cache-tier modes The "proxy" and "forward" cache-tier modes have been completely removed, so it's sufficient to test once that they cannot be set. Fixes: a0a3ed324a130a9934735927600f01d1fa65bc0d Signed-off-by: Nathan Cutler --- qa/workunits/cephtool/test.sh | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/qa/workunits/cephtool/test.sh b/qa/workunits/cephtool/test.sh index 9534cc23e1b3b..b518137fc5dcc 100755 --- a/qa/workunits/cephtool/test.sh +++ b/qa/workunits/cephtool/test.sh @@ -345,21 +345,20 @@ function test_tiering_1() ceph osd tier add slow cache ceph osd tier add slow cache2 expect_false ceph osd tier add slow2 cache - # test some state transitions - ceph osd tier cache-mode cache writeback - # forward is removed/deprecated + # forward and proxy are removed/deprecated expect_false ceph osd tier cache-mode cache forward expect_false ceph osd tier cache-mode cache forward --yes-i-really-mean-it + expect_false ceph osd tier cache-mode cache proxy + expect_false ceph osd tier cache-mode cache proxy --yes-i-really-mean-it + # test some state transitions + ceph osd tier cache-mode cache writeback expect_false ceph osd tier cache-mode cache readonly - ceph osd tier cache-mode cache proxy + expect_false ceph osd tier cache-mode cache readonly --yes-i-really-mean-it + ceph osd tier cache-mode cache readproxy ceph osd tier cache-mode cache none ceph osd tier cache-mode cache readonly --yes-i-really-mean-it - expect_false ceph osd tier cache-mode cache forward - expect_false ceph osd tier cache-mode cache forward --yes-i-really-mean-it ceph osd tier cache-mode cache none ceph osd tier cache-mode cache writeback - ceph osd tier cache-mode cache proxy - ceph osd tier cache-mode cache writeback expect_false ceph osd tier cache-mode cache none expect_false ceph osd tier cache-mode cache readonly --yes-i-really-mean-it # test with dirty objects in the tier pool @@ -367,7 +366,7 @@ function test_tiering_1() rados -p cache put /etc/passwd /etc/passwd flush_pg_stats # 1 dirty object in pool 'cache' - ceph osd tier cache-mode cache proxy + ceph osd tier cache-mode cache readproxy expect_false ceph osd tier cache-mode cache none expect_false ceph osd tier cache-mode cache readonly --yes-i-really-mean-it ceph osd tier cache-mode cache writeback @@ -376,7 +375,7 @@ function test_tiering_1() rados -p cache cache-flush-evict-all flush_pg_stats # no dirty objects in pool 'cache' - ceph osd tier cache-mode cache proxy + ceph osd tier cache-mode cache readproxy ceph osd tier cache-mode cache none ceph osd tier cache-mode cache readonly --yes-i-really-mean-it TRIES=0 @@ -1108,7 +1107,7 @@ function test_mon_mds() # Removing tier should be permitted because the underlying pool is # replicated (#11504 case) - ceph osd tier cache-mode mds-tier proxy + ceph osd tier cache-mode mds-tier readproxy ceph osd tier remove-overlay fs_metadata ceph osd tier remove fs_metadata mds-tier ceph osd pool delete mds-tier mds-tier --yes-i-really-really-mean-it