Project

General

Profile

Actions

Bug #68211

closed
DK RS

Wrong x-rgw-quota-bucket-objects header when bucket quota is disabled

Bug #68211: Wrong x-rgw-quota-bucket-objects header when bucket quota is disabled

Added by Denis Krienbühl about 2 years ago. Updated 3 months ago.

Status:
Resolved
Priority:
Normal
Assignee:
Target version:
-
Due date:
% Done:

100%

Source:
Community (user)
Backport:
reef squid
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Tags (freeform):
Fixed In:
v19.3.0-6184-g236002230a
Released In:
v20.2.0~1592
Upkeep Timestamp:
2026-08-28T01:37:32+00:00

Description

In Ceph 18.2.4, the X-RGW-Quota-Bucket-Objects header always contains the
quota value of the actual bucket, even if the quota is not enabled per-bucket, but
per-user.

Here's a bucket with a per-user quota:

$ radosgw-admin user info --uid $uid | jq .bucket_quota
{
  "enabled": true,
  "check_on_raw": false,
  "max_size": -1,
  "max_size_kb": 0,
  "max_objects": 10000000
}
$ radosgw-admin bucket stats --bucket $bucket | jq .bucket_quota
{
  "enabled": false,
  "check_on_raw": false,
  "max_size": -1,
  "max_size_kb": 0,
  "max_objects": -1
}
# Using a recent curl release (e.g. 8.7+)
$ curl $objects_url/$bucket --request HEAD --user $access_key:$secret_key --aws-sigv4 "aws:amz:us-east-1:s3" -v 2>&1 | grep bucket-object
< x-rgw-quota-bucket-objects: -1

Changing the bucket quota, even though it is not enabled, causes the header to be set ot the given quota:

radosgw-admin quota set --quota-scope=bucket --max-objects=100 --bucket $bucket
$ radosgw-admin bucket stats --bucket $bucket | jq .bucket_quota
{
  "enabled": false,
  "check_on_raw": false,
  "max_size": -1,
  "max_size_kb": 0,
  "max_objects": 100
}
$ curl $objects_url/$bucket --request HEAD --user $access_key:$secret_key --aws-sigv4 "aws:amz:us-east-1:s3" -v 2>&1 | grep bucket-object
< x-rgw-quota-bucket-objects: 100

Note that the per-bucket quota did not have to be enabled for the value to change.

I'm not sure how this is designed to work, but I naively expected these headers to reflect the quota that's actually applied.


Related issues 2 (1 open — 1 closed)

Copied to rgw - Backport #69047: reef: Wrong x-rgw-quota-bucket-objects header when bucket quota is disabledRejectedRaja Sharma

Actions
Copied to rgw - Backport #69048: squid: Wrong x-rgw-quota-bucket-objects header when bucket quota is disabledNewRaja Sharma

Actions

DG Updated by Daniel Gryniewicz about 2 years ago Actions #1

  • Tags set to low-hanging-fruit

The headers we return for this are:

X-RGW-Quota-User-Size, X-RGW-Quota-User-Objects, X-RGW-Quota-Max-Buckets, X-RGW-Quota-Bucket-Size, X-RGW-Quota-Bucket-Objects

So we are including the user quota. There's no indication of whether or not each quota is enabled. So one possible fix is to include enabled status, another is to only include each quota if it's enabled.

RS Updated by Raja Sharma about 2 years ago Actions #2

  • Status changed from New to In Progress
  • Assignee set to Raja Sharma
  • % Done changed from 0 to 50
  • Pull request ID set to 60551

RS Updated by Raja Sharma about 2 years ago Actions #3

  • Status changed from In Progress to Fix Under Review

RS Updated by Raja Sharma about 2 years ago Actions #4

  • Pull request ID changed from 60551 to 60756

CB Updated by Casey Bodley about 2 years ago Actions #5

  • Status changed from Fix Under Review to Pending Backport
  • Backport set to reef squid

UB Updated by Upkeep Bot about 2 years ago Actions #6

  • Copied to Backport #69047: reef: Wrong x-rgw-quota-bucket-objects header when bucket quota is disabled added

UB Updated by Upkeep Bot about 2 years ago Actions #7

  • Copied to Backport #69048: squid: Wrong x-rgw-quota-bucket-objects header when bucket quota is disabled added

UB Updated by Upkeep Bot about 2 years ago Actions #8

  • Tags (freeform) set to backport_processed

RS Updated by Raja Sharma almost 2 years ago Actions #9

  • Status changed from Pending Backport to Resolved
  • % Done changed from 50 to 100

UB Updated by Upkeep Bot over 1 year ago Actions #10

  • Merge Commit set to 236002230ab5107bf48c51c75392f57844ddef39
  • Fixed In set to v19.3.0-6184-g236002230ab
  • Upkeep Timestamp set to 2025-07-10T11:37:49+00:00

UB Updated by Upkeep Bot over 1 year ago Actions #11

  • Fixed In changed from v19.3.0-6184-g236002230ab to v19.3.0-6184-g236002230a
  • Upkeep Timestamp changed from 2025-07-10T11:37:49+00:00 to 2025-07-14T20:10:23+00:00

UB Updated by Upkeep Bot about 1 year ago Actions #12

  • Released In set to v20.2.0~1592
  • Upkeep Timestamp changed from 2025-07-14T20:10:23+00:00 to 2025-11-01T01:30:32+00:00

UB Updated by Upkeep Bot 3 months ago Actions #13

  • Tags (freeform) deleted (backport_processed)
  • Upkeep Timestamp changed from 2025-11-01T01:30:32+00:00 to 2026-08-28T01:37:32+00:00
Actions

Also available in: PDF Atom