Project

General

Profile

Actions

Bug #6621

closed

quota: the max-size and max-objects value when zero

Added by Tamilarasi muthamizhan over 10 years ago. Updated over 6 years ago.

Status:
Resolved
Priority:
Urgent
Assignee:
Target version:
-
% Done:

0%

Source:
Tags:
Backport:
Regression:
No
Severity:
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

ceph version: 0.71-249-g31a9492 (31a94922a9ada132bea06be308484ead84e4d879)

while setting quota, the max-size field has to be validated to not accept 0 or any negative values.

ubuntu@mira026:~$ sudo radosgw-admin quota set --bucket=kftestbucket2013_09_23__17_12_02 --max-size=0

ubuntu@mira026:~$ sudo radosgw-admin bucket stats --bucket=kftestbucket2013_09_23__17_12_02
{ "bucket": "kftestbucket2013_09_23__17_12_02",
  "pool": ".rgw.buckets",
  "index_pool": ".rgw.buckets",
  "id": "ny-ny.5511.30",
  "marker": "ny-ny.5511.30",
  "owner": "qa_user",
  "ver": 5,
  "master_ver": 0,
  "mtime": 1382573765,
  "max_marker": "",
  "usage": { "rgw.main": { "size_kb": 20480,
          "size_kb_actual": 20480,
          "num_objects": 2}},
  "bucket_quota": { "enabled": true,
      "max_size_kb": 0,
      "max_objects": -1}}

Actions #1

Updated by Tamilarasi muthamizhan over 10 years ago

  • Subject changed from quota: the max-size allowed cannot be zero to quota: the max-size and max-objects value allowed cannot be zero

same applies to max-objects as well

ubuntu@mira026:~$ sudo radosgw-admin quota set --bucket=kftestbucket2013_09_24__16_27_19 --max-objects=0

ubuntu@mira026:~$ sudo radosgw-admin bucket stats --bucket=kftestbucket2013_09_24__16_27_19
{ "bucket": "kftestbucket2013_09_24__16_27_19",
  "pool": ".rgw.buckets",
  "index_pool": ".rgw.buckets",
  "id": "ny-ny.5511.37",
  "marker": "ny-ny.5511.37",
  "owner": "qq_user",
  "ver": 3,
  "master_ver": 0,
  "mtime": 1382657551,
  "max_marker": "",
  "usage": { "rgw.main": { "size_kb": 10240,
          "size_kb_actual": 10240,
          "num_objects": 1}},
  "bucket_quota": { "enabled": true,
      "max_size_kb": 10240,
      "max_objects": 0}}
Actions #2

Updated by Sage Weil over 10 years ago

  • Priority changed from Normal to Urgent
Actions #3

Updated by Yehuda Sadeh over 10 years ago

Oh, I thought the problem was the other way around (that it wasn't accepting 0 or negative numbers). That's by design. A negative number means that the value check is disabled. E.g., we only want to enforce max size, but not number of objects so we'd put a -1 for the max_objects field.
Zero mean that we don't allow any data there.

Actions #4

Updated by Tamilarasi muthamizhan over 10 years ago

ok got it, if its by design, i think we should add this to the radosgw-admin help page saying that we allow max size to be 0 and -1 on purpose and what the purpose is.

Actions #5

Updated by Tamilarasi muthamizhan over 10 years ago

  • Tracker changed from Bug to Documentation
  • Project changed from rgw to Ceph
  • Category set to 22
Actions #6

Updated by Yehuda Sadeh over 10 years ago

  • Tracker changed from Documentation to Bug

There was an actual issue with setting negative values, so moved that back into the bug tracker. A fix was pushed to wip-6621.

Actions #7

Updated by Sage Weil over 10 years ago

  • Status changed from New to Resolved
Actions #8

Updated by Tamilarasi muthamizhan about 10 years ago

  • Status changed from Resolved to In Progress
Actions #9

Updated by Tamilarasi muthamizhan about 10 years ago

  • Subject changed from quota: the max-size and max-objects value allowed cannot be zero to rgw user quota: the max-size and max-objects value allowed cannot be zero
Actions #10

Updated by Tamilarasi muthamizhan about 10 years ago

  • Subject changed from rgw user quota: the max-size and max-objects value allowed cannot be zero to rgw user quota: the max-size and max-objects value when zero still allows data
Actions #11

Updated by Tamilarasi muthamizhan about 10 years ago

  • Subject changed from rgw user quota: the max-size and max-objects value when zero still allows data to quota: the max-size and max-objects value when zero
Actions #12

Updated by Tamilarasi muthamizhan about 10 years ago

  • Status changed from In Progress to Resolved
Actions #13

Updated by John Spray over 6 years ago

  • Project changed from Ceph to rgw
  • Category deleted (22)

Bulk reassign of radosgw category to RGW project.

Actions

Also available in: Atom PDF