Project

General

Profile

Actions

Backport #15023

closed

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

Added by Nathan Cutler about 8 years ago. Updated over 7 years ago.

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


Related issues 1 (0 open1 closed)

Copied from rgw - Bug #14507: rgw: user quota may not adjust on bucket removalResolvedIsaac Otsiabah01/25/2016

Actions
Actions #1

Updated by Nathan Cutler about 8 years ago

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

Updated by Wei-Chung Cheng about 8 years ago

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

Updated by Wei-Chung Cheng about 8 years ago

  • Description updated (diff)
Actions #4

Updated by Loïc Dachary about 8 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;
+     }
+   }
+ 
Actions #5

Updated by Loïc Dachary about 8 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) {
Actions #6

Updated by Nathan Cutler almost 8 years ago

  • Status changed from In Progress to Resolved
Actions #7

Updated by Loïc Dachary over 7 years ago

  • Target version set to v0.94.8
Actions

Also available in: Atom PDF