Re: radosgw get quota

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Sorry, the information is in the headers.  So I think the valid question
to follow up is why is this information in the headers and not the body
of the request.  I think this is a bug, but maybe I am not aware of a
subtly.  It would seem this json comes from this line[0].

[0] -
https://github.com/ceph/ceph/blob/83e10f7e2df0a71bd59e6ef2aa06b52b186fddaa/src/rgw/rgw_rest_user.cc#L697

For example the information is returned in what seems to be the
Content-type header as follows.  Maybe the missing : in the json
encoding would explain something?

INFO:requests.packages.urllib3.connectionpool:Starting new HTTPS
connection (1): ceph.umiacs.umd.edu
DEBUG:requests.packages.urllib3.connectionpool:"GET
/admin/user?quota&format=json&uid=foo1209&quota-type=user HTTP/1.1" 200 0
INFO:rgwadmin.rgw:[('date', 'Thu, 29 Oct 2015 18:28:45 GMT'),
('{"enabled"', 'true,"max_size_kb":12345,"max_objects":-1}Content-type:
application/json'), ('content-length', '0'), ('server', 'Apache/2.4.6
(Red Hat Enterprise Linux) OpenSSL/1.0.1e-fips mod_wsgi/3.4 Python/2.7.5')]

On 10/28/15 11:15 PM, Derek Yarnell wrote:
> I have had this issue before, and I don't think I have resolved it.  I
> have been using the RGW admin api to set quota based on the docs[0].
> But I can't seem to be able to get it to cough up and show me the quota
> now.  Any ideas I get a 200 back but no body, I have tested this on a
> Firefly (0.80.5-9) and Hammer (0.87.2-0) cluster.  The latter is what
> the logs are for.
> 
> [0] - http://docs.ceph.com/docs/master/radosgw/adminops/#quotas
> 
> DEBUG:rgwadmin.rgw:URL:
> http://ceph.umiacs.umd.edu/admin/user?quota&uid=derek&quota-type=user
> DEBUG:rgwadmin.rgw:Access Key: RTJ1TL13CH613JRU2PJD
> DEBUG:rgwadmin.rgw:Verify: True  CA Bundle: None
> INFO:requests.packages.urllib3.connectionpool:Starting new HTTP
> connection (1): ceph.umiacs.umd.edu
> DEBUG:requests.packages.urllib3.connectionpool:"GET
> /admin/user?quota&uid=derek&quota-type=user HTTP/1.1" 200 0
> INFO:rgwadmin.rgw:No JSON object could be decoded
> 
> 
> 2015-10-28 23:02:46.445367 7f444cff1700  1 civetweb: 0x7f445c026d00:
> 127.0.0.1 - - [28/Oct/2015:23:02:46 -0400] "GET /admin/user HTTP/1.1" -1
> 0 - python-requests/2.7.0 CPython/2.7.5 Linux/3.10.0-229.14.1.el7.x86_64
> 2015-10-28 23:03:02.063755 7f447ace2700  2
> RGWDataChangesLog::ChangesRenewThread: start
> 2015-10-28 23:03:17.139339 7f443cfd1700 20 RGWEnv::set(): HTTP_HOST:
> localhost:7480
> 2015-10-28 23:03:17.139357 7f443cfd1700 20 RGWEnv::set():
> HTTP_ACCEPT_ENCODING: gzip, deflate
> 2015-10-28 23:03:17.139358 7f443cfd1700 20 RGWEnv::set(): HTTP_ACCEPT: */*
> 2015-10-28 23:03:17.139364 7f443cfd1700 20 RGWEnv::set():
> HTTP_USER_AGENT: python-requests/2.7.0 CPython/2.7.5
> Linux/3.10.0-229.14.1.el7.x86_64
> 2015-10-28 23:03:17.139375 7f443cfd1700 20 RGWEnv::set(): HTTP_DATE:
> Thu, 29 Oct 2015 03:03:17 GMT
> 2015-10-28 23:03:17.139377 7f443cfd1700 20 RGWEnv::set():
> HTTP_AUTHORIZATION: AWS RTJ1TL13CH613JRU2PJD:ZtDQkxc+Nqo04zVsNND0yx32lds=
> 2015-10-28 23:03:17.139381 7f443cfd1700 20 RGWEnv::set():
> HTTP_X_FORWARDED_FOR: 128.8.132.4
> 2015-10-28 23:03:17.139383 7f443cfd1700 20 RGWEnv::set():
> HTTP_X_FORWARDED_HOST: ceph.umiacs.umd.edu
> 2015-10-28 23:03:17.139385 7f443cfd1700 20 RGWEnv::set():
> HTTP_X_FORWARDED_SERVER: cephproxy00.umiacs.umd.edu
> 2015-10-28 23:03:17.139387 7f443cfd1700 20 RGWEnv::set():
> HTTP_CONNECTION: Keep-Alive
> 2015-10-28 23:03:17.139392 7f443cfd1700 20 RGWEnv::set():
> REQUEST_METHOD: GET
> 2015-10-28 23:03:17.139394 7f443cfd1700 20 RGWEnv::set(): REQUEST_URI:
> /admin/user
> 2015-10-28 23:03:17.139397 7f443cfd1700 20 RGWEnv::set(): QUERY_STRING:
> quota&uid=derek&quota-type=user
> 2015-10-28 23:03:17.139401 7f443cfd1700 20 RGWEnv::set(): REMOTE_USER:
> 2015-10-28 23:03:17.139403 7f443cfd1700 20 RGWEnv::set(): SCRIPT_URI:
> /admin/user
> 2015-10-28 23:03:17.139408 7f443cfd1700 20 RGWEnv::set(): SERVER_PORT: 7480
> 2015-10-28 23:03:17.139409 7f443cfd1700 20 HTTP_ACCEPT=*/*
> 2015-10-28 23:03:17.139410 7f443cfd1700 20 HTTP_ACCEPT_ENCODING=gzip,
> deflate
> 2015-10-28 23:03:17.139411 7f443cfd1700 20 HTTP_AUTHORIZATION=AWS
> RTJ1TL13CH613JRU2PJD:ZtDQkxc+Nqo04zVsNND0yx32lds=
> 2015-10-28 23:03:17.139412 7f443cfd1700 20 HTTP_CONNECTION=Keep-Alive
> 2015-10-28 23:03:17.139412 7f443cfd1700 20 HTTP_DATE=Thu, 29 Oct 2015
> 03:03:17 GMT
> 2015-10-28 23:03:17.139413 7f443cfd1700 20 HTTP_HOST=localhost:7480
> 2015-10-28 23:03:17.139413 7f443cfd1700 20
> HTTP_USER_AGENT=python-requests/2.7.0 CPython/2.7.5
> Linux/3.10.0-229.14.1.el7.x86_64
> 2015-10-28 23:03:17.139414 7f443cfd1700 20 HTTP_X_FORWARDED_FOR=128.8.132.4
> 2015-10-28 23:03:17.139415 7f443cfd1700 20
> HTTP_X_FORWARDED_HOST=ceph.umiacs.umd.edu
> 2015-10-28 23:03:17.139416 7f443cfd1700 20
> HTTP_X_FORWARDED_SERVER=cephproxy00.umiacs.umd.edu
> 2015-10-28 23:03:17.139416 7f443cfd1700 20
> QUERY_STRING=quota&uid=derek&quota-type=user
> 2015-10-28 23:03:17.139417 7f443cfd1700 20 REMOTE_USER=
> 2015-10-28 23:03:17.139417 7f443cfd1700 20 REQUEST_METHOD=GET
> 2015-10-28 23:03:17.139418 7f443cfd1700 20 REQUEST_URI=/admin/user
> 2015-10-28 23:03:17.139419 7f443cfd1700 20 SCRIPT_URI=/admin/user
> 2015-10-28 23:03:17.139419 7f443cfd1700 20 SERVER_PORT=7480
> 2015-10-28 23:03:17.139422 7f443cfd1700 20 RGWEnv::set(): HTTP_HOST:
> localhost:7480
> 2015-10-28 23:03:17.139423 7f443cfd1700 20 RGWEnv::set():
> HTTP_ACCEPT_ENCODING: gzip, deflate
> 2015-10-28 23:03:17.139424 7f443cfd1700 20 RGWEnv::set(): HTTP_ACCEPT: */*
> 2015-10-28 23:03:17.139425 7f443cfd1700 20 RGWEnv::set():
> HTTP_USER_AGENT: python-requests/2.7.0 CPython/2.7.5
> Linux/3.10.0-229.14.1.el7.x86_64
> 2015-10-28 23:03:17.139426 7f443cfd1700 20 RGWEnv::set(): HTTP_DATE:
> Thu, 29 Oct 2015 03:03:17 GMT
> 2015-10-28 23:03:17.139428 7f443cfd1700 20 RGWEnv::set():
> HTTP_AUTHORIZATION: AWS RTJ1TL13CH613JRU2PJD:ZtDQkxc+Nqo04zVsNND0yx32lds=
> 2015-10-28 23:03:17.139429 7f443cfd1700 20 RGWEnv::set():
> HTTP_X_FORWARDED_FOR: 128.8.132.4
> 2015-10-28 23:03:17.139430 7f443cfd1700 20 RGWEnv::set():
> HTTP_X_FORWARDED_HOST: ceph.umiacs.umd.edu
> 2015-10-28 23:03:17.139431 7f443cfd1700 20 RGWEnv::set():
> HTTP_X_FORWARDED_SERVER: cephproxy00.umiacs.umd.edu
> 2015-10-28 23:03:17.139432 7f443cfd1700 20 RGWEnv::set():
> HTTP_CONNECTION: Keep-Alive
> 2015-10-28 23:03:17.139433 7f443cfd1700 20 RGWEnv::set():
> REQUEST_METHOD: GET
> 2015-10-28 23:03:17.139434 7f443cfd1700 20 RGWEnv::set(): REQUEST_URI:
> /admin/user
> 2015-10-28 23:03:17.139435 7f443cfd1700 20 RGWEnv::set(): QUERY_STRING:
> quota&uid=derek&quota-type=user
> 2015-10-28 23:03:17.139436 7f443cfd1700 20 RGWEnv::set(): REMOTE_USER:
> 2015-10-28 23:03:17.139437 7f443cfd1700 20 RGWEnv::set(): SCRIPT_URI:
> /admin/user
> 2015-10-28 23:03:17.139438 7f443cfd1700 20 RGWEnv::set(): SERVER_PORT: 7480
> 2015-10-28 23:03:17.139439 7f443cfd1700 20 HTTP_ACCEPT=*/*
> 2015-10-28 23:03:17.139439 7f443cfd1700 20 HTTP_ACCEPT_ENCODING=gzip,
> deflate
> 2015-10-28 23:03:17.139440 7f443cfd1700 20 HTTP_AUTHORIZATION=AWS
> RTJ1TL13CH613JRU2PJD:ZtDQkxc+Nqo04zVsNND0yx32lds=
> 2015-10-28 23:03:17.139441 7f443cfd1700 20 HTTP_CONNECTION=Keep-Alive
> 2015-10-28 23:03:17.139441 7f443cfd1700 20 HTTP_DATE=Thu, 29 Oct 2015
> 03:03:17 GMT
> 2015-10-28 23:03:17.139442 7f443cfd1700 20 HTTP_HOST=localhost:7480
> 2015-10-28 23:03:17.139443 7f443cfd1700 20
> HTTP_USER_AGENT=python-requests/2.7.0 CPython/2.7.5
> Linux/3.10.0-229.14.1.el7.x86_64
> 2015-10-28 23:03:17.139444 7f443cfd1700 20 HTTP_X_FORWARDED_FOR=128.8.132.4
> 2015-10-28 23:03:17.139444 7f443cfd1700 20
> HTTP_X_FORWARDED_HOST=ceph.umiacs.umd.edu
> 2015-10-28 23:03:17.139445 7f443cfd1700 20
> HTTP_X_FORWARDED_SERVER=cephproxy00.umiacs.umd.edu
> 2015-10-28 23:03:17.139446 7f443cfd1700 20
> QUERY_STRING=quota&uid=derek&quota-type=user
> 2015-10-28 23:03:17.139446 7f443cfd1700 20 REMOTE_USER=
> 2015-10-28 23:03:17.139447 7f443cfd1700 20 REQUEST_METHOD=GET
> 2015-10-28 23:03:17.139447 7f443cfd1700 20 REQUEST_URI=/admin/user
> 2015-10-28 23:03:17.139448 7f443cfd1700 20 SCRIPT_URI=/admin/user
> 2015-10-28 23:03:17.139449 7f443cfd1700 20 SERVER_PORT=7480
> 2015-10-28 23:03:17.139450 7f443cfd1700  1 ====== starting new request
> req=0x7f4468047d00 =====
> 2015-10-28 23:03:17.139462 7f443cfd1700  2 req 0:0.000013::GET
> /admin/user::initializing
> 2015-10-28 23:03:17.139466 7f443cfd1700 10 host=localhost:7480
> rgw_dns_name=ceph.umiacs.umd.edu
> 2015-10-28 23:03:17.139495 7f443cfd1700  2 req 0:0.000045::GET
> /admin/user::getting op
> 2015-10-28 23:03:17.139498 7f443cfd1700  2 req 0:0.000049::GET
> /admin/user:get_quota_info:authorizing
> 2015-10-28 23:03:17.139532 7f443cfd1700 10 get_canon_resource():
> dest=/admin/user
> 2015-10-28 23:03:17.139533 7f443cfd1700 10 auth_hdr:
> GET
> 
> 
> Thu, 29 Oct 2015 03:03:17 GMT
> /admin/user
> 2015-10-28 23:03:17.139597 7f443cfd1700 15 calculated
> digest=ZtDQkxc+Nqo04zVsNND0yx32lds=
> 2015-10-28 23:03:17.139599 7f443cfd1700 15
> auth_sign=ZtDQkxc+Nqo04zVsNND0yx32lds=
> 2015-10-28 23:03:17.139599 7f443cfd1700 15 compare=0
> 2015-10-28 23:03:17.139602 7f443cfd1700  2 req 0:0.000153::GET
> /admin/user:get_quota_info:reading permissions
> 2015-10-28 23:03:17.139604 7f443cfd1700  2 req 0:0.000155::GET
> /admin/user:get_quota_info:init op
> 2015-10-28 23:03:17.139606 7f443cfd1700  2 req 0:0.000157::GET
> /admin/user:get_quota_info:verifying op mask
> 2015-10-28 23:03:17.139608 7f443cfd1700 20 required_mask= 0 user.op_mask=7
> 2015-10-28 23:03:17.139609 7f443cfd1700  2 req 0:0.000160::GET
> /admin/user:get_quota_info:verifying op permissions
> 2015-10-28 23:03:17.139611 7f443cfd1700  2 req 0:0.000162::GET
> /admin/user:get_quota_info:verifying op params
> 2015-10-28 23:03:17.139612 7f443cfd1700  2 req 0:0.000163::GET
> /admin/user:get_quota_info:executing
> 2015-10-28 23:03:17.139637 7f443cfd1700 20 get_obj_state:
> rctx=0x7f446805dd90 obj=.users.uid:derek state=0x7f446803c5c8
> s->prefetch_data=0
> 2015-10-28 23:03:17.139644 7f443cfd1700 10 cache get:
> name=.users.uid+derek : hit
> 2015-10-28 23:03:17.139649 7f443cfd1700 20 get_obj_state: s->obj_tag was
> set empty
> 2015-10-28 23:03:17.139653 7f443cfd1700 10 cache get:
> name=.users.uid+derek : hit
> 2015-10-28 23:03:17.139726 7f443cfd1700  2 req 0:0.000277::GET
> /admin/user:get_quota_info:http status=200
> 2015-10-28 23:03:17.139743 7f443cfd1700  1 ====== req done
> req=0x7f4468047d00 http_status=200 ======
> 2015-10-28 23:03:17.139805 7f443cfd1700  1 civetweb: 0x7f4468023310:
> 127.0.0.1 - - [28/Oct/2015:23:03:17 -0400] "GET /admin/user HTTP/1.1" -1
> 0 - python-requests/2.7.0 CPython/2.7.5 Linux/3.10.0-229.14.1.el7.x86_64
> 2015-10-28 23:03:24.063871 7f447ace2700  2
> RGWDataChangesLog::ChangesRenewThread: start
> 

-- 
Derek T. Yarnell
University of Maryland
Institute for Advanced Computer Studies
_______________________________________________
ceph-users mailing list
ceph-users@xxxxxxxxxxxxxx
http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com



[Index of Archives]     [Information on CEPH]     [Linux Filesystem Development]     [Ceph Development]     [Ceph Large]     [Linux USB Development]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [xfs]


  Powered by Linux