From e18519ad09700ecce6ede411e4ac87bed8bbb516 Mon Sep 17 00:00:00 2001 From: David Zafman Date: Tue, 28 Jan 2020 15:23:19 -0800 Subject: [PATCH] test: Update pg log test for new trimming behavior Fixes: https://tracker.ceph.com/issues/43864 Signed-off-by: David Zafman --- qa/standalone/osd/repro_long_log.sh | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/qa/standalone/osd/repro_long_log.sh b/qa/standalone/osd/repro_long_log.sh index 97d572e553f..a95a5ee94e7 100755 --- a/qa/standalone/osd/repro_long_log.sh +++ b/qa/standalone/osd/repro_long_log.sh @@ -62,6 +62,8 @@ function setup_log_test() { POOL_ID=$(ceph osd dump --format json | jq '.pools[] | select(.pool_name == "test") | .pool') PGID="${POOL_ID}.0" + # With 1 PG setting entries per osd 20 results in a target log of 20 + ceph tell osd.\* injectargs -- --osd_target_pg_log_entries_per_osd 20 || return 1 ceph tell osd.\* injectargs -- --osd-min-pg-log-entries 20 || return 1 ceph tell osd.\* injectargs -- --osd-max-pg-log-entries 30 || return 1 ceph tell osd.\* injectargs -- --osd-pg-log-trim-min 10 || return 1 @@ -116,33 +118,34 @@ function TEST_trim_max_entries() setup_log_test $dir || return 1 - ceph tell osd.\* injectargs -- --osd-min-pg-log-entries 1 + ceph tell osd.\* injectargs -- --osd_target_pg_log_entries_per_osd 2 || return 1 + ceph tell osd.\* injectargs -- --osd-min-pg-log-entries 2 ceph tell osd.\* injectargs -- --osd-pg-log-trim-min 2 ceph tell osd.\* injectargs -- --osd-pg-log-trim-max 4 # adding log entries, should only trim 4 and add one each time rados -p test rm foo - test_log_size $PGID 17 + test_log_size $PGID 18 || return 1 rados -p test rm foo - test_log_size $PGID 14 + test_log_size $PGID 15 || return 1 rados -p test rm foo - test_log_size $PGID 11 + test_log_size $PGID 12 || return 1 rados -p test rm foo - test_log_size $PGID 8 + test_log_size $PGID 9 || return 1 rados -p test rm foo - test_log_size $PGID 5 + test_log_size $PGID 6 || return 1 rados -p test rm foo - test_log_size $PGID 2 + test_log_size $PGID 3 || return 1 # below trim_min rados -p test rm foo - test_log_size $PGID 3 + test_log_size $PGID 4 || return 1 rados -p test rm foo - test_log_size $PGID 3 + test_log_size $PGID 3 || return 1 rados -p test rm foo - test_log_size $PGID 3 + test_log_size $PGID 4 || return 1 rados -p test rm foo - test_log_size $PGID 3 + test_log_size $PGID 3 || return 1 } main repro-long-log "$@"