Project

General

Profile

Backport #15023

hammer: rgw: user quota may not adjust on bucket removal

Added by Nathan Cutler about 6 years ago. Updated over 5 years ago.

Status:
Resolved
Priority:
Normal
Target version:
Release:
hammer
Crash signature (v1):
Crash signature (v2):


Related issues

Copied from rgw - Bug #14507: rgw: user quota may not adjust on bucket removal Resolved 01/25/2016

History

#1 Updated by Nathan Cutler about 6 years ago

  • Copied from Bug #14507: rgw: user quota may not adjust on bucket removal added

#2 Updated by Wei-Chung Cheng about 6 years ago

  • Status changed from New to In Progress
  • Assignee set to Wei-Chung Cheng

#3 Updated by Wei-Chung Cheng about 6 years ago

  • Description updated (diff)

#4 Updated by Loïc Dachary about 6 years ago

commit=5c5f206fa409b9857aad835bfc2c523dabc0c57a ; picked_from=$(git show --no-patch --pretty=%b $commit | perl -ne 'print if(s/.*cherry picked from commit (\w+).*/$1/)') ; diff -u --ignore-matching-lines '^[^+-]' <(git show $picked_from) <(git show $commit)
--- /dev/fd/63    2016-03-17 09:01:21.645745536 +0100
+++ /dev/fd/62    2016-03-17 09:01:21.645745536 +0100
@@ -21,7 +35,7 @@
      }
    }

-+  ret = rgw_bucket_sync_user_stats(store, bucket.tenant, bucket.name);
++  ret = rgw_bucket_sync_user_stats(store, bucket.name);
 +  if ( ret < 0) {
 +     dout(1) << "WARNING: failed sync user stats before bucket delete. ret=" <<  ret << dendl;
 +  }
@@ -37,11 +51,19 @@
      }
    }

-+  op_ret = rgw_bucket_sync_user_stats(store, s->user.user_id, s->bucket);
-+  if ( op_ret < 0) {
-+     ldout(s->cct, 1) << "WARNING: failed to sync user stats before bucket delete: op_ret= " << op_ret << dendl;
+-  ret = store->delete_bucket(s->bucket, ot);
++  ret = rgw_bucket_sync_user_stats(store, s->user.user_id, s->bucket);
++  if ( ret < 0) {
++     ldout(s->cct, 1) << "WARNING: failed to sync user stats before bucket delete: ret= " << ret << dendl;
 +  }
-+
-   op_ret = store->delete_bucket(s->bucket, ot);
-   if (op_ret == 0) {
-     op_ret = rgw_unlink_bucket(store, s->user.user_id, s->bucket.tenant,
+ 
++  ret = store->delete_bucket(s->bucket, ot);
+   if (ret == 0) {
+     ret = rgw_unlink_bucket(store, s->user.user_id, s->bucket.name, false);
+     if (ret < 0) {
+-      ldout(s->cct, 0) << "WARNING: failed to unlink bucket: ret=" << ret << dendl;
++      ldout(s->cct, 0) << "WARNING: failed to unlink bucket: ret=" << ret
++               << dendl;
+     }
+   }
+ 

#5 Updated by Loïc Dachary about 6 years ago

commit=aa8702d55325aa5c6c6a79ebb0cd49c19e3096fa ; picked_from=$(git show --no-patch --pretty=%b $commit | perl -ne 'print if(s/.*cherry picked from commit (\w+).*/$1/)') ; diff -u --ignore-matching-lines '^[^+-]' <(git show $picked_from) <(git show $commit)
--- /dev/fd/63    2016-03-17 10:04:53.573107425 +0100
+++ /dev/fd/62    2016-03-17 10:04:53.573107425 +0100
@@ -21,7 +35,7 @@
      }
    }

-+  ret = rgw_bucket_sync_user_stats(store, bucket.tenant, bucket.name);
++  ret = rgw_bucket_sync_user_stats(store, bucket.name);
 +  if ( ret < 0) {
 +     dout(1) << "WARNING: failed sync user stats before bucket delete. ret=" <<  ret << dendl;
 +  }
@@ -37,11 +51,11 @@
      }
    }

-+  op_ret = rgw_bucket_sync_user_stats(store, s->user.user_id, s->bucket);
-+  if ( op_ret < 0) {
-+     ldout(s->cct, 1) << "WARNING: failed to sync user stats before bucket delete: op_ret= " << op_ret << dendl;
++  ret = rgw_bucket_sync_user_stats(store, s->user.user_id, s->bucket);
++  if ( ret < 0) {
++     ldout(s->cct, 1) << "WARNING: failed to sync user stats before bucket delete: ret= " << ret << dendl;
 +  }
 +
-   op_ret = store->delete_bucket(s->bucket, ot);
-   if (op_ret == 0) {
-     op_ret = rgw_unlink_bucket(store, s->user.user_id, s->bucket.tenant,
+   ret = store->delete_bucket(s->bucket, ot);
+ 
+   if (ret == 0) {

#6 Updated by Nathan Cutler almost 6 years ago

  • Status changed from In Progress to Resolved

#7 Updated by Loïc Dachary over 5 years ago

  • Target version set to v0.94.8

Also available in: Atom PDF