Commit Graph

25988 Commits

Author SHA1 Message Date
Christophe Courtaut
3a20b06938 rgw: admin: Add --shard-id option to help
http://tracker.ceph.com/issues/5324 fixes #5324
Explains operations dependency,
which is more important than the semantic.

Signed-off-by: Christophe Courtaut <christophe.courtaut@gmail.com>
2013-07-02 15:24:02 +02:00
Yehuda Sadeh
2ad4ff69a1 rgw: metadata, data logs can be turned on / off
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2013-07-01 15:55:46 -07:00
Yehuda Sadeh
cfc1f2ee1f rgw: modify RGWBucketInfo::creation_time encoding / decoding
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2013-07-01 11:01:39 -07:00
Yehuda Sadeh
c73a24be07 rgw: end-marker serves as last value, not as upperbound
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2013-06-29 21:00:05 -07:00
Yehuda Sadeh
c4140303b7 rgw: relax marker requirements for log apis
Don't require start-time, start-marker.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2013-06-29 20:59:34 -07:00
Yehuda Sadeh
b21a41ab58 rgw: update log APIs to use markers
a few APIs were missing markers, fixed that.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2013-06-29 20:39:00 -07:00
Yehuda Sadeh
ce7d816d9f rgw: cls_log_entry has id field
The id field can be used as the marker for log list / trim
operations.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2013-06-29 20:39:00 -07:00
Yehuda Sadeh
064e92f000 Makefile.am: some more makefile rules fixes
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2013-06-29 20:39:00 -07:00
Yehuda Sadeh
c2a56e524d rgw: date string parsing also parses seconds fraction
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2013-06-29 20:38:52 -07:00
Yehuda Sadeh
0335905d4c rgw: fix cli test
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2013-06-29 15:28:15 -07:00
Yehuda Sadeh
5314e3fe85 Makefile.am: add missing rule
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2013-06-29 15:28:01 -07:00
Yehuda Sadeh
e56ef07eb1 rgw: initialize sent_header in RGWOp_Opstate_List
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2013-06-28 14:47:43 -07:00
Yehuda Sadeh
e75057fc2c rgw-admin: restructure replicalog commands
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2013-06-28 13:17:26 -07:00
Yehuda Sadeh
12ab4f881d Merge remote-tracking branch 'enovance/wip-rgw-geo-2-opstate' into wip-rgw-geo-2
Conflicts:
	src/Makefile.am
	src/rgw/rgw_admin.cc
	src/rgw/rgw_common.h

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2013-06-28 11:26:30 -07:00
Yehuda Sadeh
72ac281d7a rgw: don't remove bucket index when removing a bucket
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2013-06-27 23:21:51 -07:00
Yehuda Sadeh
10a2b60f33 rgw: bilog list by bucket instance (RESTful api)
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2013-06-27 23:12:09 -07:00
Yehuda Sadeh
977df7781b ceph_json: reset values
Call the default constructor if entry not found. Also,
reset containers before inserting new data.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2013-06-27 21:13:12 -07:00
Yehuda Sadeh
674bbabe85 rgw: user param in access key is not manadatory
for json decoding

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2013-06-27 21:13:12 -07:00
Yehuda Sadeh
9d702e5894 rgw: advance ptr when sending data
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2013-06-27 21:13:08 -07:00
Babu Shanmugam
b4ee7cac1f changes to accomodate review comments on previous version
Signed-off-by: Babu Shanmugam <anbu@enovance.com>
2013-06-27 20:10:28 +05:30
Yehuda Sadeh
8f1da8f3d4 rgw: fix regionmap json decoding
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2013-06-26 22:39:07 -07:00
Yehuda Sadeh
af00f73348 rgw: automatic pool creation for placement pools
With the new pools configuration, now we auto create the
pools when needed (through bucket creation). Also, make
sure only to configure default placement in zone structure,
if old config hasn't been done yet.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2013-06-25 22:55:53 -07:00
Yehuda Sadeh
7a2566c60f rgw: remove test placement info
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2013-06-25 20:06:45 -07:00
Yehuda Sadeh
224130c9f7 rgw (test): remove some warnings
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2013-06-25 19:18:51 -07:00
Yehuda Sadeh
1b162ce662 rgw: initialize user system flag
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2013-06-25 17:59:37 -07:00
Yehuda Sadeh
7681c58e03 rgw: log in the same shard for bucket entry point and instance
We'd like to have bucket entry point and instance info at the same
log shard, so that we can process them in order.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2013-06-25 15:30:44 -07:00
Yehuda Sadeh
d4e39a7676 rgw: unlink/link don't always update entry point
Some operations already update the entry point, so no
need to do it again.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2013-06-25 14:59:49 -07:00
Yehuda Sadeh
6673b2d3aa rgw: tie metadata put to bucket link/unlink
and lot's of constifying

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2013-06-25 14:00:59 -07:00
Yehuda Sadeh
5c3df085c6 cls_rgw: cleanup
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2013-06-25 14:00:45 -07:00
Yehuda Sadeh
82db84bec5 rgw: some more internal api cleanups
Use of rgw_bucket when referring to the bucket instance,
use bucket name when referring to the bucket entry point.
Also, remove bucket input param where not needed (internally
was using the bucket structure from the bucket info).

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2013-06-25 12:56:25 -07:00
Yehuda Sadeh
c4be5a7057 rgw: unlink bucket from user on metadata rm bucket:< bucket>
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2013-06-25 12:19:17 -07:00
Yehuda Sadeh
86c73c94ff rgw: fixes to object versioning tracking
There are a few different cases for setting the object version.
Either we need to create a new version, or we need to set the
version provided (one metadata put). We also need to make sure
that we log the correct previous version of the object. This
commit fixes a few cases.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2013-06-25 11:09:19 -07:00
Yehuda Sadeh
8bd31d42a2 rgw: filter read xattrs
We're only interested in object xattrs that have specific rgw.user
prefix.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2013-06-25 11:05:15 -07:00
Yehuda Sadeh
422bb6d0ac rgw: add str_startswith()
useful util

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2013-06-25 11:03:12 -07:00
Yehuda Sadeh
8db289f2e2 cls_ver: rename version xattr, add some more logging
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2013-06-25 10:36:00 -07:00
Yehuda Sadeh
63e81afeb8 rgw: multiple fixes related to metadata, bucket creation
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2013-06-24 23:43:50 -07:00
Yehuda Sadeh
7e41c1036d rgw: bucket entry point contains owner, other fix
We now keep the owner at the bucket entry point. Also, reading
bucket info at RGWCreateBucket::execute(), because previous changes
has made it so that we didn't have the required bucket info
initialized there.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2013-06-24 17:27:34 -07:00
Babu Shanmugam
626d9eed64 opstate RESTful API implementation with unit test application
Signed-off-by: Babu Shanmugam <anbu@enovance.com>
2013-06-24 18:54:32 +05:30
Yehuda Sadeh
1e3161a84e rgw: add a system request param to select op bucket instance
Added rgwx-bucket-instance request param that selects the actual bucket
instance to use for this request.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2013-06-23 23:18:44 -07:00
Yehuda Sadeh
76228caf65 rgw: data log contains bucket instance info in key
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2013-06-23 22:34:24 -07:00
Yehuda Sadeh
5dd137ace4 rgw: format bucket.instance meta entries nicely
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2013-06-23 21:44:05 -07:00
Yehuda Sadeh
4e90c5ec29 rgw: use new instance handler for bucket operations
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2013-06-23 21:16:14 -07:00
Yehuda Sadeh
71869c4b9e rgw: create meta handler for bucket instance
Create utility functions for reading writing bucket entry
point and bucket instance. Add a separate meta handler for
bucket instance.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2013-06-23 21:00:00 -07:00
Yehuda Sadeh
00973dfdca rgw: put_bucket_info() uses objv_tracker in bucket info
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2013-06-23 19:42:17 -07:00
Yehuda Sadeh
dab57ef883 rgw: keep objv_tracker on bucket info
This ties it to the specific object instance info.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2013-06-23 18:52:39 -07:00
Yehuda Sadeh
e053d1718d rgw: refactor policy reading
reuse bucket info, no need to reread it again.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2013-06-23 15:38:09 -07:00
Yehuda Sadeh
d74cdad526 rgw: fix policy read
policy reading used to have exact same logic for both buckets
and objects, however, we now need to read bucket attributes
through get_bucket_info().

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2013-06-23 13:39:13 -07:00
Yehuda Sadeh
ad6406726f rgw: init member variable
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2013-06-23 13:12:59 -07:00
Yehuda Sadeh
b09d799f2c rgw: encode bucket info only after setting a flag
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2013-06-23 13:12:26 -07:00
Yehuda Sadeh
c3260b2768 rgw: initial work to separate bucket name and instance
Bucket info now resides in an instance specific object. The
old bucket info object now contains a pointer to the new
instance.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2013-06-23 01:15:56 -07:00