summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--qa/suites/krbd/rbd-nomount/tasks/krbd_data_pool.yaml6
-rw-r--r--qa/suites/rados/thrash-erasure-code/workloads/ec-pool-snaps-few-objects-overwrites.yaml2
-rw-r--r--qa/suites/rados/thrash-erasure-code/workloads/ec-small-objects-fast-read-overwrites.yaml2
-rw-r--r--qa/suites/rados/thrash-erasure-code/workloads/ec-small-objects-overwrites.yaml2
-rw-r--r--qa/suites/rados/thrash-erasure-code/workloads/ec-snaps-few-objects-overwrites.yaml2
-rw-r--r--qa/suites/rbd/cli/pool/ec-data-pool.yaml4
-rw-r--r--qa/suites/rbd/librbd/pool/ec-data-pool.yaml4
-rw-r--r--qa/suites/rbd/qemu/pool/ec-data-pool.yaml4
-rw-r--r--qa/tasks/ceph_manager.py13
-rw-r--r--qa/tasks/rados.py10
-rwxr-xr-xqa/workunits/rbd/krbd_data_pool.sh2
-rw-r--r--src/mon/FSCommands.cc2
-rw-r--r--src/mon/MonCommands.h2
-rw-r--r--src/mon/OSDMonitor.cc15
-rw-r--r--src/osd/ECBackend.cc12
-rw-r--r--src/osd/osd_types.h2
16 files changed, 32 insertions, 52 deletions
diff --git a/qa/suites/krbd/rbd-nomount/tasks/krbd_data_pool.yaml b/qa/suites/krbd/rbd-nomount/tasks/krbd_data_pool.yaml
index 24985fb79d5..35b9d67ebff 100644
--- a/qa/suites/krbd/rbd-nomount/tasks/krbd_data_pool.yaml
+++ b/qa/suites/krbd/rbd-nomount/tasks/krbd_data_pool.yaml
@@ -1,9 +1,3 @@
-overrides:
- ceph:
- conf:
- global:
- enable experimental unrecoverable data corrupting features: debug_white_box_testing_ec_overwrites
-
tasks:
- workunit:
clients:
diff --git a/qa/suites/rados/thrash-erasure-code/workloads/ec-pool-snaps-few-objects-overwrites.yaml b/qa/suites/rados/thrash-erasure-code/workloads/ec-pool-snaps-few-objects-overwrites.yaml
index 7d494fdad98..d2ad70a57ec 100644
--- a/qa/suites/rados/thrash-erasure-code/workloads/ec-pool-snaps-few-objects-overwrites.yaml
+++ b/qa/suites/rados/thrash-erasure-code/workloads/ec-pool-snaps-few-objects-overwrites.yaml
@@ -12,7 +12,7 @@ tasks:
objects: 50
pool_snaps: true
ec_pool: true
- erasure_code_use_hacky_overwrites: true
+ erasure_code_use_overwrites: true
op_weights:
read: 100
write: 100
diff --git a/qa/suites/rados/thrash-erasure-code/workloads/ec-small-objects-fast-read-overwrites.yaml b/qa/suites/rados/thrash-erasure-code/workloads/ec-small-objects-fast-read-overwrites.yaml
index c2e16487572..b3f831b778e 100644
--- a/qa/suites/rados/thrash-erasure-code/workloads/ec-small-objects-fast-read-overwrites.yaml
+++ b/qa/suites/rados/thrash-erasure-code/workloads/ec-small-objects-fast-read-overwrites.yaml
@@ -14,7 +14,7 @@ tasks:
objects: 1024
size: 16384
ec_pool: true
- erasure_code_use_hacky_overwrites: true
+ erasure_code_use_overwrites: true
fast_read: true
op_weights:
read: 100
diff --git a/qa/suites/rados/thrash-erasure-code/workloads/ec-small-objects-overwrites.yaml b/qa/suites/rados/thrash-erasure-code/workloads/ec-small-objects-overwrites.yaml
index 80a58172169..9baacef4890 100644
--- a/qa/suites/rados/thrash-erasure-code/workloads/ec-small-objects-overwrites.yaml
+++ b/qa/suites/rados/thrash-erasure-code/workloads/ec-small-objects-overwrites.yaml
@@ -14,7 +14,7 @@ tasks:
objects: 1024
size: 16384
ec_pool: true
- erasure_code_use_hacky_overwrites: true
+ erasure_code_use_overwrites: true
op_weights:
read: 100
write: 100
diff --git a/qa/suites/rados/thrash-erasure-code/workloads/ec-snaps-few-objects-overwrites.yaml b/qa/suites/rados/thrash-erasure-code/workloads/ec-snaps-few-objects-overwrites.yaml
index 00263c414cc..b7c53819938 100644
--- a/qa/suites/rados/thrash-erasure-code/workloads/ec-snaps-few-objects-overwrites.yaml
+++ b/qa/suites/rados/thrash-erasure-code/workloads/ec-snaps-few-objects-overwrites.yaml
@@ -11,7 +11,7 @@ tasks:
ops: 4000
objects: 50
ec_pool: true
- erasure_code_use_hacky_overwrites: true
+ erasure_code_use_overwrites: true
op_weights:
read: 100
write: 100
diff --git a/qa/suites/rbd/cli/pool/ec-data-pool.yaml b/qa/suites/rbd/cli/pool/ec-data-pool.yaml
index a6c35e57ae3..523d7450afb 100644
--- a/qa/suites/rbd/cli/pool/ec-data-pool.yaml
+++ b/qa/suites/rbd/cli/pool/ec-data-pool.yaml
@@ -3,12 +3,10 @@ tasks:
client.0:
- sudo ceph osd erasure-code-profile set teuthologyprofile ruleset-failure-domain=osd m=1 k=2
- sudo ceph osd pool create datapool 4 4 erasure teuthologyprofile
- - sudo ceph osd pool set datapool debug_white_box_testing_ec_overwrites true
+ - sudo ceph osd pool set datapool allow_ec_overwrites true
overrides:
ceph:
conf:
- global:
- enable experimental unrecoverable data corrupting features: debug_white_box_testing_ec_overwrites
client:
rbd default data pool: datapool
diff --git a/qa/suites/rbd/librbd/pool/ec-data-pool.yaml b/qa/suites/rbd/librbd/pool/ec-data-pool.yaml
index a6c35e57ae3..523d7450afb 100644
--- a/qa/suites/rbd/librbd/pool/ec-data-pool.yaml
+++ b/qa/suites/rbd/librbd/pool/ec-data-pool.yaml
@@ -3,12 +3,10 @@ tasks:
client.0:
- sudo ceph osd erasure-code-profile set teuthologyprofile ruleset-failure-domain=osd m=1 k=2
- sudo ceph osd pool create datapool 4 4 erasure teuthologyprofile
- - sudo ceph osd pool set datapool debug_white_box_testing_ec_overwrites true
+ - sudo ceph osd pool set datapool allow_ec_overwrites true
overrides:
ceph:
conf:
- global:
- enable experimental unrecoverable data corrupting features: debug_white_box_testing_ec_overwrites
client:
rbd default data pool: datapool
diff --git a/qa/suites/rbd/qemu/pool/ec-data-pool.yaml b/qa/suites/rbd/qemu/pool/ec-data-pool.yaml
index a6c35e57ae3..523d7450afb 100644
--- a/qa/suites/rbd/qemu/pool/ec-data-pool.yaml
+++ b/qa/suites/rbd/qemu/pool/ec-data-pool.yaml
@@ -3,12 +3,10 @@ tasks:
client.0:
- sudo ceph osd erasure-code-profile set teuthologyprofile ruleset-failure-domain=osd m=1 k=2
- sudo ceph osd pool create datapool 4 4 erasure teuthologyprofile
- - sudo ceph osd pool set datapool debug_white_box_testing_ec_overwrites true
+ - sudo ceph osd pool set datapool allow_ec_overwrites true
overrides:
ceph:
conf:
- global:
- enable experimental unrecoverable data corrupting features: debug_white_box_testing_ec_overwrites
client:
rbd default data pool: datapool
diff --git a/qa/tasks/ceph_manager.py b/qa/tasks/ceph_manager.py
index c6d5ef4691d..f4c9ebc7e9d 100644
--- a/qa/tasks/ceph_manager.py
+++ b/qa/tasks/ceph_manager.py
@@ -1479,7 +1479,7 @@ class CephManager:
def create_pool_with_unique_name(self, pg_num=16,
erasure_code_profile_name=None,
min_size=None,
- erasure_code_use_hacky_overwrites=False):
+ erasure_code_use_overwrites=False):
"""
Create a pool named unique_pool_X where X is unique.
"""
@@ -1492,7 +1492,7 @@ class CephManager:
pg_num,
erasure_code_profile_name=erasure_code_profile_name,
min_size=min_size,
- erasure_code_use_hacky_overwrites=erasure_code_use_hacky_overwrites)
+ erasure_code_use_overwrites=erasure_code_use_overwrites)
return name
@contextlib.contextmanager
@@ -1504,15 +1504,14 @@ class CephManager:
def create_pool(self, pool_name, pg_num=16,
erasure_code_profile_name=None,
min_size=None,
- erasure_code_use_hacky_overwrites=False):
+ erasure_code_use_overwrites=False):
"""
Create a pool named from the pool_name parameter.
:param pool_name: name of the pool being created.
:param pg_num: initial number of pgs.
:param erasure_code_profile_name: if set and !None create an
erasure coded pool using the profile
- :param erasure_code_use_hacky_overwrites: if true, use the hacky
- overwrites mode
+ :param erasure_code_use_overwrites: if true, allow overwrites
"""
with self.lock:
assert isinstance(pool_name, basestring)
@@ -1531,10 +1530,10 @@ class CephManager:
'osd', 'pool', 'set', pool_name,
'min_size',
str(min_size))
- if erasure_code_use_hacky_overwrites:
+ if erasure_code_use_overwrites:
self.raw_cluster_cmd(
'osd', 'pool', 'set', pool_name,
- 'debug_white_box_testing_ec_overwrites',
+ 'allow_ec_overwrites',
'true')
self.pools[pool_name] = pg_num
time.sleep(1)
diff --git a/qa/tasks/rados.py b/qa/tasks/rados.py
index 15a35e5988d..4e4f746cb05 100644
--- a/qa/tasks/rados.py
+++ b/qa/tasks/rados.py
@@ -55,9 +55,7 @@ def task(ctx, config):
rollback: 2
snap_remove: 0
ec_pool: create an ec pool, defaults to False
- erasure_code_use_hacky_overwrites: use the whitebox
- testing experimental
- overwrites mode
+ erasure_code_use_overwrites: test overwrites, default false
erasure_code_profile:
name: teuthologyprofile
k: 2
@@ -139,7 +137,7 @@ def task(ctx, config):
'ceph_test_rados']
if config.get('ec_pool', False):
args.extend(['--no-omap'])
- if config.get('erasure_code_use_hacky_overwrites', False):
+ if config.get('erasure_code_use_overwrites', False):
args.extend(['--no-sparse'])
else:
args.extend(['--ec-pool'])
@@ -230,8 +228,8 @@ def task(ctx, config):
else:
pool = manager.create_pool_with_unique_name(
erasure_code_profile_name=profile_name,
- erasure_code_use_hacky_overwrites=
- config.get('erasure_code_use_hacky_overwrites', False)
+ erasure_code_use_overwrites=
+ config.get('erasure_code_use_overwrites', False)
)
created_pools.append(pool)
if config.get('fast_read', False):
diff --git a/qa/workunits/rbd/krbd_data_pool.sh b/qa/workunits/rbd/krbd_data_pool.sh
index 2c83d34ca87..0b7b6c933ec 100755
--- a/qa/workunits/rbd/krbd_data_pool.sh
+++ b/qa/workunits/rbd/krbd_data_pool.sh
@@ -84,7 +84,7 @@ function count_data_objects() {
ceph osd pool create repdata 24 24
ceph osd erasure-code-profile set teuthologyprofile ruleset-failure-domain=osd m=1 k=2
ceph osd pool create ecdata 24 24 erasure teuthologyprofile
-ceph osd pool set ecdata debug_white_box_testing_ec_overwrites true
+ceph osd pool set ecdata allow_ec_overwrites true
ceph osd pool create rbdnonzero 24 24
ceph osd pool create clonesonly 24 24
diff --git a/src/mon/FSCommands.cc b/src/mon/FSCommands.cc
index cc2dfe04c0b..630736c3989 100644
--- a/src/mon/FSCommands.cc
+++ b/src/mon/FSCommands.cc
@@ -849,7 +849,7 @@ int FileSystemCommandHandler::_check_pool(
<< " is an erasure-coded pool. Use of erasure-coded pools"
<< " for CephFS metadata is not permitted";
return -EINVAL;
- } else if (pool->is_erasure() && !pool->is_hacky_ecoverwrites()) {
+ } else if (pool->is_erasure() && !pool->allows_ecoverwrites()) {
// non-overwriteable EC pools are only acceptable with a cache tier overlay
if (!pool->has_tiers() || !pool->has_read_tier() || !pool->has_write_tier()) {
*ss << "pool '" << pool_name << "' (id '" << pool_id << "')"
diff --git a/src/mon/MonCommands.h b/src/mon/MonCommands.h
index 3945e4b3480..9506814f7be 100644
--- a/src/mon/MonCommands.h
+++ b/src/mon/MonCommands.h
@@ -737,7 +737,7 @@ COMMAND("osd pool get " \
"get pool parameter <var>", "osd", "r", "cli,rest")
COMMAND("osd pool set " \
"name=pool,type=CephPoolname " \
- "name=var,type=CephChoices,strings=size|min_size|crash_replay_interval|pg_num|pgp_num|crush_rule|crush_ruleset|hashpspool|nodelete|nopgchange|nosizechange|write_fadvise_dontneed|noscrub|nodeep-scrub|hit_set_type|hit_set_period|hit_set_count|hit_set_fpp|use_gmt_hitset|debug_fake_ec_pool|target_max_bytes|target_max_objects|cache_target_dirty_ratio|cache_target_dirty_high_ratio|cache_target_full_ratio|cache_min_flush_age|cache_min_evict_age|auid|min_read_recency_for_promote|min_write_recency_for_promote|fast_read|hit_set_grade_decay_rate|hit_set_search_last_n|scrub_min_interval|scrub_max_interval|deep_scrub_interval|recovery_priority|recovery_op_priority|scrub_priority|compression_mode|compression_algorithm|compression_required_ratio|compression_max_blob_size|compression_min_blob_size|csum_type|csum_min_block|csum_max_block|debug_white_box_testing_ec_overwrites " \
+ "name=var,type=CephChoices,strings=size|min_size|crash_replay_interval|pg_num|pgp_num|crush_rule|crush_ruleset|hashpspool|nodelete|nopgchange|nosizechange|write_fadvise_dontneed|noscrub|nodeep-scrub|hit_set_type|hit_set_period|hit_set_count|hit_set_fpp|use_gmt_hitset|debug_fake_ec_pool|target_max_bytes|target_max_objects|cache_target_dirty_ratio|cache_target_dirty_high_ratio|cache_target_full_ratio|cache_min_flush_age|cache_min_evict_age|auid|min_read_recency_for_promote|min_write_recency_for_promote|fast_read|hit_set_grade_decay_rate|hit_set_search_last_n|scrub_min_interval|scrub_max_interval|deep_scrub_interval|recovery_priority|recovery_op_priority|scrub_priority|compression_mode|compression_algorithm|compression_required_ratio|compression_max_blob_size|compression_min_blob_size|csum_type|csum_min_block|csum_max_block|allow_ec_overwrites " \
"name=val,type=CephString " \
"name=force,type=CephChoices,strings=--yes-i-really-mean-it,req=false", \
"set pool parameter <var> to <val>", "osd", "rw", "cli,rest")
diff --git a/src/mon/OSDMonitor.cc b/src/mon/OSDMonitor.cc
index 07a99f23724..5cdbac9866c 100644
--- a/src/mon/OSDMonitor.cc
+++ b/src/mon/OSDMonitor.cc
@@ -5768,18 +5768,13 @@ int OSDMonitor::prepare_command_pool_set(map<string,cmd_vartype> &cmdmap,
ss << "expecting value 'true' or '1'";
return -EINVAL;
}
- } else if (var == "debug_white_box_testing_ec_overwrites") {
+ } else if (var == "allow_ec_overwrites") {
+ if (!p.is_erasure()) {
+ ss << "ec overwrites can only be enabled for an erasure coded pool";
+ return -EINVAL;
+ }
if (val == "true" || (interr.empty() && n == 1)) {
- if (cct->check_experimental_feature_enabled(
- "debug_white_box_testing_ec_overwrites")) {
p.flags |= pg_pool_t::FLAG_EC_OVERWRITES;
- } else {
- ss << "debug_white_box_testing_ec_overwrites is an experimental feature "
- << "and must be enabled. Note, this feature does not yet actually "
- << "work. This flag merely enables some of the preliminary support "
- << "for testing purposes.";
- return -ENOTSUP;
- }
} else if (val == "false" || (interr.empty() && n == 0)) {
ss << "ec overwrites cannot be disabled once enabled";
return -EINVAL;
diff --git a/src/osd/ECBackend.cc b/src/osd/ECBackend.cc
index ea285cc4e6f..569bb89529e 100644
--- a/src/osd/ECBackend.cc
+++ b/src/osd/ECBackend.cc
@@ -954,7 +954,7 @@ void ECBackend::handle_sub_read(
++i) {
int r = 0;
ECUtil::HashInfoRef hinfo;
- if (!get_parent()->get_pool().is_hacky_ecoverwrites()) {
+ if (!get_parent()->get_pool().allows_ecoverwrites()) {
hinfo = get_hash_info(i->first);
if (!hinfo) {
r = -EIO;
@@ -989,7 +989,7 @@ void ECBackend::handle_sub_read(
);
}
- if (!get_parent()->get_pool().is_hacky_ecoverwrites()) {
+ if (!get_parent()->get_pool().allows_ecoverwrites()) {
// This shows that we still need deep scrub because large enough files
// are read in sections, so the digest check here won't be done here.
// Do NOT check osd_read_eio_on_bad_digest here. We need to report
@@ -1732,7 +1732,7 @@ bool ECBackend::try_state_to_reads()
Op *op = &(waiting_state.front());
if (op->requires_rmw() && pipeline_state.cache_invalid()) {
- assert(get_parent()->get_pool().is_hacky_ecoverwrites());
+ assert(get_parent()->get_pool().allows_ecoverwrites());
dout(20) << __func__ << ": blocking " << *op
<< " because it requires an rmw and the cache is invalid "
<< pipeline_state
@@ -1786,7 +1786,7 @@ bool ECBackend::try_state_to_reads()
dout(10) << __func__ << ": " << *op << dendl;
if (!op->remote_read.empty()) {
- assert(get_parent()->get_pool().is_hacky_ecoverwrites());
+ assert(get_parent()->get_pool().allows_ecoverwrites());
objects_read_async_no_cache(
op->remote_read,
[this, op](map<hobject_t,pair<int, extent_map> > &&results) {
@@ -1859,7 +1859,7 @@ bool ECBackend::try_reads_to_commit()
dout(20) << __func__ << ": written: " << written << dendl;
dout(20) << __func__ << ": op: " << *op << dendl;
- if (!get_parent()->get_pool().is_hacky_ecoverwrites()) {
+ if (!get_parent()->get_pool().allows_ecoverwrites()) {
for (auto &&i: op->log_entries) {
if (i.requires_kraken()) {
derr << __func__ << ": log entry " << i << " requires kraken"
@@ -2365,7 +2365,7 @@ void ECBackend::be_deep_scrub(
o.digest_present = false;
return;
} else {
- if (!get_parent()->get_pool().is_hacky_ecoverwrites()) {
+ if (!get_parent()->get_pool().allows_ecoverwrites()) {
assert(hinfo->has_chunk_hash());
if (hinfo->get_total_chunk_size() != pos) {
dout(0) << "_scan_list " << poid << " got incorrect size on read" << dendl;
diff --git a/src/osd/osd_types.h b/src/osd/osd_types.h
index 1c4e4c65a6c..550ea8dfca3 100644
--- a/src/osd/osd_types.h
+++ b/src/osd/osd_types.h
@@ -1448,7 +1448,7 @@ public:
}
uint64_t required_alignment() const { return stripe_width; }
- bool is_hacky_ecoverwrites() const {
+ bool allows_ecoverwrites() const {
return has_flag(FLAG_EC_OVERWRITES);
}