Skip to content

Commit 196a73c

Browse files
cls/rgw: add a helper function for calls to cls_cxx_map_remove_key()
Add some testing cases and do cleanup too. Signed-off-by: Mingyuan Liang <[email protected]>
1 parent e2fb2c6 commit 196a73c

File tree

10 files changed

+160
-298
lines changed

10 files changed

+160
-298
lines changed

doc/radosgw/dynamicresharding.rst

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,8 @@ Configuration
5151
.. confval:: rgw_reshard_bucket_lock_duration
5252
.. confval:: rgw_reshard_thread_interval
5353
.. confval:: rgw_reshard_num_logs
54-
55-
- ``rgw_reshard_progress_judge_interval``: interval of judging if bucket reshard failed in reshard log process state, default: 120 seconds
56-
57-
- ``rgw_reshard_progress_judge_ratio``: ratio of reshard progress judge interval to randomly vary, default: 0.5
54+
.. confval:: rgw_reshard_progress_judge_interval
55+
.. confval:: rgw_reshard_progress_judge_ratio
5856

5957
Admin commands
6058
==============

qa/workunits/rgw/test_rgw_reshard.py

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ def test_bucket_reshard(conn, name, **fault):
114114
# try reshard with fault injection
115115
_, ret = run_bucket_reshard_cmd(name, num_shards_expected, check_retcode=False, **fault)
116116

117-
if fault.get('error_code') == errno.ECANCELED:
117+
if fault.get('error_code') == errno.ECANCELED or fault.get('error_code') == errno.EOPNOTSUPP:
118118
assert(ret == 0) # expect ECANCELED to retry and succeed
119119
else:
120120
assert(ret != 0 and ret != errno.EBUSY)
@@ -214,13 +214,27 @@ def main():
214214
log.error("Resharding failed on bucket {}. Expected number of shards are not created\n".format(BUCKET_NAME))
215215

216216
# TESTCASE 'manual bucket resharding','inject error','fail','check bucket accessibility', 'retry reshard'
217+
log.debug('TEST: reshard bucket with EIO injected at init_index\n')
218+
test_bucket_reshard(connection, 'error-at-init-index', error_at='init_index')
219+
log.debug('TEST: reshard bucket with EOPNOTSUPP injected at init_index\n')
220+
test_bucket_reshard(connection, 'error-at-init-index', error_at='init_index', error_code=errno.EOPNOTSUPP)
221+
log.debug('TEST: reshard bucket with abort at init_index\n')
222+
test_bucket_reshard(connection, 'abort-at-init-indext', abort_at='init_index')
223+
217224
log.debug('TEST: reshard bucket with EIO injected at set_target_layout\n')
218225
test_bucket_reshard(connection, 'error-at-set-target-layout', error_at='set_target_layout')
219226
log.debug('TEST: reshard bucket with ECANCELED injected at set_target_layout\n')
220227
test_bucket_reshard(connection, 'error-at-set-target-layout', error_at='set_target_layout', error_code=errno.ECANCELED)
221228
log.debug('TEST: reshard bucket with abort at set_target_layout\n')
222229
test_bucket_reshard(connection, 'abort-at-set-target-layout', abort_at='set_target_layout')
223230

231+
log.debug('TEST: reshard bucket with EIO injected at trim_reshard_log_entries\n')
232+
test_bucket_reshard(connection, 'error-at-trim-reshard-log-entries', error_at='trim_reshard_log_entries')
233+
log.debug('TEST: reshard bucket with EOPNOTSUPP injected at trim_reshard_log_entries\n')
234+
test_bucket_reshard(connection, 'error-at-trim-reshard-log-entries', error_at='trim_reshard_log_entries', error_code=errno.EOPNOTSUPP)
235+
log.debug('TEST: reshard bucket with abort at trim_reshard_log_entries\n')
236+
test_bucket_reshard(connection, 'abort-at-trim-reshard-log-entries', abort_at='trim_reshard_log_entries')
237+
224238
log.debug('TEST: reshard bucket with EIO injected at block_writes\n')
225239
test_bucket_reshard(connection, 'error-at-block-writes', error_at='block_writes')
226240
log.debug('TEST: reshard bucket with abort at block_writes\n')

0 commit comments

Comments
 (0)