Bug #5323
closedtrim data log lists dates as optional, enforced as required in the current code
0%
Description
In the wip-rgw-geo branch, the
DELETE /admin/log?id=<shard id>
call lists start-time and end-time as optional. However, if they are omitted, RGW returns a status 400 (Bad Request).
Here is the boto log:
INFO:requests.packages.urllib3.connectionpool:Starting new HTTP connection (1): rgw-n1
DEBUG:requests.packages.urllib3.connectionpool:"GET /admin/log?id=63&type=metadata&id=63 HTTP/1.1" 200 None
INFO:__main__:radosgw-admin-rest: ['log', 'trim', 'id=63'] {'end-time': '2013-06-11 18:12:08', 'type': 'metadata', 'id': 63}
DEBUG:boto:path=/admin/log?id=63
DEBUG:boto:auth_path=/admin/log?id=63
DEBUG:boto:StringToSign:
DELETE
application/json; charset=UTF-8
Wed, 12 Jun 2013 01:12:08 GMT
/admin/log
DEBUG:boto:Signature:
AWS 85OKY95S2US1LB4Z4ZYI:1ylL9zVtvLgHJrOY4gElrqWm24Q=
I'm attaching the rgw log.
Files
Updated by Anonymous almost 11 years ago
I believe that the offending line is in ceph/src/rgw/rgw_rest_log.cc in the function RGWOp_MDLog_Delete::execute().
line:
if (st.empty() || et.empty())
Updated by Yehuda Sadeh almost 11 years ago
I wonder if they should be optional. It's easy to purge the entire log by mistake.