Project

General

Profile

Bug #23821

rgw: admin rest api shouldn't return error when getting user's stats if the user hasn't create any bucket.

Added by joke lee over 1 year ago. Updated over 1 year ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Target version:
-
Start date:
04/23/2018
Due date:
% Done:

0%

Source:
Tags:
Backport:
luminous
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:

Description

rgw: admin rest api shouldn't return error when getting user's stats if the user hasn't create any bucket.

new create user without create any bucket

< GET /admin/user?info&uid=test2testa&format=json HTTP/1.1
< Host: 127.0.0.1:80
< Accept-Encoding: gzip, deflate
< Accept: */*
< User-Agent: python-requests/2.6.0 CPython/2.7.5 Linux/3.10.0-327.el7.x86_64
< Connection: keep-alive
< date: Fri, 20 Apr 2018 08:15:54 GMT
< Authorization: AWS admin:ejN0kC+NB13+dsg5Y2Xa7KIPk9w=
<

HTTP/1.1 200 OK
date: Fri, 20 Apr 2018 08:15:54 GMT
content-length: 270
x-amz-request-id: tx00000000000000000002a-005ad9a1ba-121f0-default
connection: Keep-Alive

with get stats

< GET /admin/user?info&uid=test2testa&stats=True&format=json HTTP/1.1
< Host: 127.0.0.1:80
< Accept-Encoding: gzip, deflate
< Accept: */*
< User-Agent: python-requests/2.6.0 CPython/2.7.5 Linux/3.10.0-327.el7.x86_64
< Connection: keep-alive
< date: Fri, 20 Apr 2018 08:16:11 GMT
< Authorization: AWS admin:JMLnVZU8+TGWVI140BPD0+/+NuU=
<

HTTP/1.1 404 Not Found
content-length: 116
accept-ranges: bytes
connection: Keep-Alive
x-amz-request-id: tx00000000000000000002c-005ad9a1cb-121f0-default
date: Fri, 20 Apr 2018 08:16:11 GMT
content-type: application/json

{"Code":"NoSuchKey","RequestId":"tx00000000000000000002c-005ad9a1cb-121f0-default","HostId":"121f0-default-default"}

https://github.com/ceph/ceph/pull/21551 this pr fix this


Related issues

Copied to rgw - Backport #23861: luminous: rgw: admin rest api shouldn't return error when getting user's stats if the user hasn't create any bucket. Resolved

History

#1 Updated by Casey Bodley over 1 year ago

  • Status changed from New to Testing
  • Backport set to luminous

#2 Updated by Casey Bodley over 1 year ago

  • Status changed from Testing to Pending Backport

#3 Updated by Nathan Cutler over 1 year ago

  • Copied to Backport #23861: luminous: rgw: admin rest api shouldn't return error when getting user's stats if the user hasn't create any bucket. added

#4 Updated by Nathan Cutler over 1 year ago

  • Status changed from Pending Backport to Resolved

Also available in: Atom PDF