Commit Graph

25912 Commits

Author SHA1 Message Date
Greg Farnum
22a02e95ae cls_replica_log: add ops for new class
Signed-off-by: Greg Farnum <greg@inktank.com>
2013-06-20 14:10:31 -07:00
Greg Farnum
d1c95943d8 cls_replica_log: add types for new class
Signed-off-by: Greg Farnum <greg@inktank.com>
2013-06-20 14:10:26 -07:00
Greg Farnum
008bdc5e64 radosgw_admin: fixup cli test
Signed-off-by: Greg Farnum <greg@inktank.com>
2013-06-20 11:09:17 -07:00
Yehuda Sadeh
483aa74fc7 test: update cli test
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2013-06-20 11:09:17 -07:00
Yehuda Sadeh
96c9493d7b radosgw-admin: interface to control ops state
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2013-06-18 23:03:13 -07:00
Yehuda Sadeh
8b1524be1f rgw: OpState internal api
Add new higher level functions to set, renew, list, and remove
logged operation state.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2013-06-18 23:02:05 -07:00
Yehuda Sadeh
258edfca9c rgw: fix check_state call
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2013-06-18 23:01:30 -07:00
Yehuda Sadeh
d628109fde rgw: specialized obj zone copy state for statelog
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2013-06-18 20:45:42 -07:00
Yehuda Sadeh
13e030216e rgw: internal api for statelog objclass
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2013-06-18 20:07:20 -07:00
Yehuda Sadeh
0b932bfdd9 cls_statelog: pass in timestamp
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2013-06-18 16:28:20 -07:00
Yehuda Sadeh
cba4de1112 cls_statelog: improve unitest
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2013-06-18 15:14:07 -07:00
Yehuda Sadeh
b89f47c84f cls_statelog: fix a few issues
Issues that came up when developed the unitest

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2013-06-18 15:13:43 -07:00
Yehuda Sadeh
e2af5fbe25 test: test for cls_statelog
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2013-06-18 00:04:46 -07:00
Yehuda Sadeh
1ecec3a1fc cls_statelog: fixes
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2013-06-18 00:04:25 -07:00
Yehuda Sadeh
8d5fc708ff cls_statelog: add client api functions
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2013-06-17 21:06:42 -07:00
Yehuda Sadeh
fbe816a135 cls_statelog: fixes and changes to api
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2013-06-17 21:06:19 -07:00
Yehuda Sadeh
7669662b62 cls_statelog: introducing new objclass to handle state tracking
Somewhat similar to the log objclass, but uses different data for
indexing. Also keeps a dual index. In general an entry has 3
identifiers:
 - object: the object id on which the operation is made
 - client_id: client's unique identifier
 - op_id: operation's unique identifier

An entry is indexed by both client_id+op_id, and by
object+op_id, make it possible to list operations
either by client_id, or by object id.
We also keep state per each entry and the new check_state request
can be used as a guard.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2013-06-17 20:10:14 -07:00
Yehuda Sadeh
f5f8314841 rgw: object mtime the same for both object and bucket index
Make sure object mtime that's passed to bucket index is the
same as the one set on the object.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2013-06-17 17:41:41 -07:00
Yehuda Sadeh
7f63baa68c rgw: fix inter-region copy (ofs wasn't correct)
Fixing an issue with data read. Since inter-region copy uses
embedded metadata within the data input, we need to fix the ofs
accordingly.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2013-06-17 17:14:22 -07:00
Yehuda Sadeh
94b3700501 rgw: intra-region copy, preserve mtime
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2013-06-17 15:39:11 -07:00
Yehuda Sadeh
4c89a2b695 rgw: system user get obj returns JSON encoded metadata
instead of binary encoded metadata

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2013-06-17 14:46:32 -07:00
Yehuda Sadeh
1113ff0212 rgw: get / set user & bucket meta mtime
also update infrastructure to be able to set mtime on objects

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2013-06-15 22:06:33 -07:00
Yehuda Sadeh
a2cf14fe27 rgw: preserve bucket creation time across different zones / regions
Keep bucket creation time in RGWBucketInfo, and make use
of it where necessary.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2013-06-15 18:41:21 -07:00
Yehuda Sadeh
8eae1b8ba2 rgw: show mtime for metadata entries
currently only shows for buckets

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2013-06-15 16:55:13 -07:00
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