]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
radosgw-admin: wait before trimming usage
authorYehuda Sadeh <yehuda@redhat.com>
Mon, 27 Oct 2014 16:49:51 +0000 (09:49 -0700)
committerAlfredo Deza <adeza@redhat.com>
Tue, 16 Dec 2014 21:15:43 +0000 (16:15 -0500)
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 <yehuda@redhat.com>
(cherry picked from commit dd09ecbfab8a659f3faaf879a52849caab5e8e8e)

tasks/radosgw_admin.py

index 619b3ffbb822c0e2826a648ffde9239b236df52f..fa667010ebbb57454903e9cb1e718111a82a7e3b 100644 (file)
@@ -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)