From 47d56d779eb145f5bca1e8e1efdeec8be92b6579 Mon Sep 17 00:00:00 2001 From: Yehuda Sadeh Date: Mon, 27 Oct 2014 09:49:51 -0700 Subject: [PATCH] radosgw-admin: wait before trimming usage Fixes: #9892 Need to wait through the usage interval before trimming usage, otherwise we might not remove all pending usage info. Backport: dumpling, firefly, giant Signed-off-by: Yehuda Sadeh (cherry picked from commit dd09ecbfab8a659f3faaf879a52849caab5e8e8e) --- tasks/radosgw_admin.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tasks/radosgw_admin.py b/tasks/radosgw_admin.py index 619b3ffbb822c..fa667010ebbb5 100644 --- a/tasks/radosgw_admin.py +++ b/tasks/radosgw_admin.py @@ -825,6 +825,10 @@ def task(ctx, config): assert entry['category'] == cat assert entry['successful_ops'] > 0 + # the usage flush interval is 30 seconds, wait that much an then some + # to make sure everything has been flushed + time.sleep(35) + # TESTCASE 'usage-trim' 'usage' 'trim' 'user usage' 'succeeds, usage removed' (err, out) = rgwadmin(ctx, client, ['usage', 'trim', '--uid', user1], check_status=True) -- 2.39.5