From 6185d69594368fa54dc3f6fe7f99d245e5e208f8 Mon Sep 17 00:00:00 2001 From: Mykola Golub Date: Tue, 21 Dec 2021 20:00:28 +0200 Subject: [PATCH] qa/tasks: improve backfill_toofull test 1) Write more data to the pool so we operate with larger ratios. 2) Round up ratios when truncating. Fixes: https://tracker.ceph.com/issues/53677 Signed-off-by: Mykola Golub (cherry picked from commit a9a09fffaec7be042b62fe7935a981282db63211) --- qa/tasks/backfill_toofull.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/qa/tasks/backfill_toofull.py b/qa/tasks/backfill_toofull.py index 1a866595d2695..f4ff90a4613b6 100644 --- a/qa/tasks/backfill_toofull.py +++ b/qa/tasks/backfill_toofull.py @@ -76,7 +76,7 @@ def task(ctx, config): target = acting[1] log.debug("write some data") - rados(ctx, mon, ['-p', pool, 'bench', '60', 'write', '--no-cleanup']) + rados(ctx, mon, ['-p', pool, 'bench', '120', 'write', '--no-cleanup']) df = manager.get_osd_df(target) log.debug("target osd df: %s" % df) @@ -120,9 +120,9 @@ def task(ctx, config): log.debug("update nearfull ratio to %s and backfillfull ratio to %s" % (nearfull, backfillfull)) manager.raw_cluster_cmd('osd', 'set-nearfull-ratio', - '{:.3f}'.format(nearfull)) + '{:.3f}'.format(nearfull + 0.001)) manager.raw_cluster_cmd('osd', 'set-backfillfull-ratio', - '{:.3f}'.format(backfillfull)) + '{:.3f}'.format(backfillfull + 0.001)) log.debug("start tartget osd %s" % target) @@ -145,7 +145,7 @@ def task(ctx, config): # We also need to update nearfull ratio to prevent "full ratio(s) out of order". pdf = manager.get_pool_df(pool) - log.debug("pool %s df: %s" % (pool, df)) + log.debug("pool %s df: %s" % (pool, pdf)) assert pdf compress_ratio = 1.0 * pdf['compress_under_bytes'] / pdf['compress_bytes_used'] \ if pdf['compress_bytes_used'] > 0 else 1.0 @@ -162,9 +162,9 @@ def task(ctx, config): log.debug("update nearfull ratio to %s and backfillfull ratio to %s" % (nearfull, backfillfull)) manager.raw_cluster_cmd('osd', 'set-nearfull-ratio', - '{:.3f}'.format(nearfull)) + '{:.3f}'.format(nearfull + 0.001)) manager.raw_cluster_cmd('osd', 'set-backfillfull-ratio', - '{:.3f}'.format(backfillfull)) + '{:.3f}'.format(backfillfull + 0.001)) wait_for_pg_state(manager, pgid, 'backfilling', target) -- 2.39.5