Commit Graph

25988 Commits

Author SHA1 Message Date
Yehuda Sadeh
8fa4394f6a rgw: fixes for intra-zone object copy
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2013-06-14 23:35:58 -07:00
Yehuda Sadeh
5df39aa490 rgw: set bucket marker and bucket obj version from master
Make sure that bucket that's created gets the same marker as
the one that the master region generated. Also, for some reason
we weren't passing in the metadata obj version for the bucket.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2013-06-14 22:58:08 -07:00
Yehuda Sadeh
622f50027f rgw: multiple changes for intra-zone object copy
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2013-06-14 21:57:25 -07:00
Yehuda Sadeh
17d65716c8 rgw: when setting bucket metadata key, don't override placement
Bucket placement also contains data and index pools locations in
the source zone. However, we might be applying it on a different
zone, so we need to be careful not to use the source location here.
We generate a new placement if a new bucket is detected, otherwise
we keep the old one.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2013-06-14 21:56:34 -07:00
Yehuda Sadeh
d5679d045d rgw: forward amz headers of copy request to remote rgw
So that if request has any special conditions, it'll be processed
on the remote gateway

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2013-06-14 18:20:41 -07:00
Yehuda Sadeh
5ff2059758 rgw: cleanup, move init_meta_info() into req_info
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2013-06-14 18:06:12 -07:00
Yehuda Sadeh
10c0ae979e rgw: remove unused variable
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2013-06-14 15:39:57 -07:00
Yehuda Sadeh
37cc85ed45 rgw: bucket marker contains zone name
(issue 5347)
We need this so that raw object names on different zones within
the same region don't collide.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2013-06-14 15:01:33 -07:00
Yehuda Sadeh
7ec64db4fd rgw: pass original object attrs through extra request data
introduce a new mechanism that sends extra data with object
info, and use it to encode source object metadata.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2013-06-13 21:59:37 -07:00
Yehuda Sadeh
cdd11ea6b6 rgw: a few fixes to copy object across region
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2013-06-12 23:59:49 -07:00
Yehuda Sadeh
165926bd02 rgw: move most of object put processors implementation
move code from rgw_op.cc to rgw_rados.cc, so that we could
use it in the lower layer.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2013-06-12 23:19:58 -07:00
Yehuda Sadeh
0b491e9a6d rgw: separate req_state from object put processors
At least, for most of them. We'll move this code to rgw_rados.cc,
and we don't want it to have req_state.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2013-06-12 23:08:25 -07:00
Yehuda Sadeh
bcdd4755f3 rgw: organize get_obj handling for copy a bit different
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2013-06-12 22:39:15 -07:00
Yehuda Sadeh
6a6025f29d rgw: generate read request if source rgw is remote
in a copy operation

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2013-06-12 21:29:23 -07:00
Yehuda Sadeh
95434d1608 rgw: propagate mtime from remote rgw on copy
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2013-06-11 18:51:14 -07:00
Yehuda Sadeh
00743d50e0 rgw: propagate error from remote gateway when copying object
Also make sure that we don't continue iterating locally through
the object.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2013-06-11 10:43:08 -07:00
Yehuda Sadeh
ea3efca3fd rgw: pass grant headers to target when writeing object
When writing object to remote gateway.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2013-06-10 21:59:15 -07:00
Yehuda Sadeh
da5e443c5f rgw: head acls target can be quoted
when passing x-amz-grant-* headers, the target (id, email,
group) may be quoted.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2013-06-10 21:58:02 -07:00
Yehuda Sadeh
db0c250f38 rgw: send meta headers with remote PUT request
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2013-06-10 14:28:03 -07:00
Yehuda Sadeh
566315c47f rgw: don't busy wait for outgoing rest requests
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2013-06-10 14:28:03 -07:00
Yehuda Sadeh
cbf860fc03 rgw: don't send redirect if copy object has a local source
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2013-06-10 14:28:03 -07:00
Yehuda Sadeh
be1d84db39 rgw: link bucket to owner on metadata update
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2013-06-10 14:28:03 -07:00
Yehuda Sadeh
bf6b80c677 rgw: fix logic related to operations on different region
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2013-06-10 14:28:03 -07:00
Yehuda Sadeh
2237086d15 rgw: minor logging change
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2013-06-10 14:28:03 -07:00
Yehuda Sadeh
6f6e425d12 rgw: fix json decoding for swift keys
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2013-06-10 14:28:03 -07:00
Yehuda Sadeh
4849c8c1f2 rgw: stream obj into http request
still need to figure out curl handle polling, handle client
errors correctly.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2013-06-10 14:28:03 -07:00
Yehuda Sadeh
284f6a20df rgw: format put request auth
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2013-06-10 14:28:03 -07:00
Yehuda Sadeh
72cb5fd64c rgw: bucket metadata, ignore ENOENT on put
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2013-06-10 14:28:03 -07:00
Yehuda Sadeh
31676c59e4 rgw: skeleton for obj copy across regions
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2013-06-10 14:28:03 -07:00
Babu Shanmugam
f6c7c0cbc7 rgw: metadata lock/unlock implemented with test cases
metadata lock/unlock implemented with test cases
split Post operations to Lock and Unlock operations, and
checking for WRITE permission only for lock and unlock

Signed-off-by: Babu Shanmugam <anbu@enovance.com>

Conflicts:
	src/rgw/rgw_rest_log.cc
	src/rgw/rgw_rest_log.h

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2013-06-10 11:54:12 -07:00
Babu Shanmugam
d1afc81064 RESTful APIs for data changes log implemented with test cases
Signed-off-by: Babu Shanmugam <anbu@enovance.com>
2013-06-10 11:34:09 -07:00
Yehuda Sadeh
08631e7af4 rgw: some user metadata fixes
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2013-05-31 14:35:49 -07:00
Yehuda Sadeh
dfad09b0f3 rgw_admin: modify mdlog functionality
mdlog list, can handle cases where there is and there's no shard id
specified. mdlog trim requires shard if.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2013-05-31 12:30:52 -07:00
Yehuda Sadeh
2b9ab9f3f5 rgw: set truncated as false if ENOENT when listing mdlog entries
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2013-05-31 12:30:29 -07:00
Yehuda Sadeh
e46d7d680e Merge branch 'wip-rgw-geo-enovance' into wip-rgw-geo-2
Conflicts:
	src/Makefile.am
	src/rgw/rgw_admin.cc

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2013-05-31 12:22:09 -07:00
Christophe Courtaut
8f3f0537f2 rgw: Do not assum rest connection to be established
Added a check to verify that rest connection is correctly initialized,
preventing a segmentation fault.

Signed-off-by: Christophe Courtaut <christophe.courtaut@gmail.com>
Reviewed-by: Yehuda Sadeh <yehuda@inktank.com>
2013-05-31 09:39:56 -07:00
Babu Shanmugam
d20e30a744 flushed the formatter after closing the primary section in MDLOG, BILOG and GETSHARDINFO :: list()
Signed-off-by: Babu Shanmugam <anbu@enovance.com>
2013-05-30 10:28:23 +05:30
Yehuda Sadeh
45873b57f0 rgw: verify bucket location only if exists
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2013-05-29 13:50:50 -07:00
Yehuda Sadeh
81a9608640 rgw: forward delete_bucket to master region
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2013-05-29 13:09:45 -07:00
Christophe Courtaut
f03a6f2142 Fixed default region creation issue
If the default region did not exist, it is created,
but the previously created RGWDefaultRegionInfo object is not updated.
This fix updates this objects after the default region creation.
It was also preventing vstart.sh script to start with -r option.

Signed-off-by: Christophe Courtaut <christophe.courtaut@gmail.com>
Reviewed-by: Yehuda Sadeh <yehuda@inktank.com>
2013-05-29 08:32:47 -07:00
Yehuda Sadeh
3e5cead0c5 rgw: user master region's version of bucket
When creating a bucket, retrieve the bucket object
version from the master region and use it.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2013-05-29 08:11:59 -07:00
Yehuda Sadeh
64d1178fa9 rgw: mdlog, bilog RESTful api cleanup
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2013-05-28 13:39:18 -07:00
Babu Shanmugam
07408117a5 With mdlog lock and unlock functionality, listing and trimming base on shard_id
Signed-off-by: Babu Shanmugam <anbu@enovance.com>
2013-05-28 05:58:42 +05:30
Yehuda Sadeh
52b23b5ed7 rgw: propagate region on bucket creation
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2013-05-24 19:54:26 -07:00
Yehuda Sadeh
3044fa8b88 rgw: determine owner after effetctive user
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2013-05-24 19:12:23 -07:00
Yehuda Sadeh
4dafea4312 rgw: forward request params through upstream REST
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2013-05-24 18:57:48 -07:00
Yehuda Sadeh
51876499e0 rgw: enable data sending via http client
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2013-05-24 14:27:42 -07:00
Yehuda Sadeh
580a08c6d6 rgw: multiple fixes and cleanups
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2013-05-23 23:14:35 -07:00
Yehuda Sadeh
2655c1e459 utime: add asctime()
dump time in a useful format

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2013-05-23 23:13:01 -07:00
Yehuda Sadeh
0c805b6c77 rgw: rest_client, forward requests
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2013-05-23 13:09:08 -07:00