]> git.apps.os.sepia.ceph.com Git - ceph.git/log
ceph.git
10 years agocls_rgw: user swap() instead of assignment operator
Yehuda Sadeh [Fri, 16 Jan 2015 19:21:49 +0000 (11:21 -0800)]
cls_rgw: user swap() instead of assignment operator

More efficient this way. A fix following code review.

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agorgw: fix unitest compilation
Yehuda Sadeh [Thu, 15 Jan 2015 16:34:12 +0000 (08:34 -0800)]
rgw: fix unitest compilation

Add the needed extra param for bilog_flags.

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agorgw: handle 'null' instance when setting delete marker
Yehuda Sadeh [Thu, 8 Jan 2015 01:21:14 +0000 (17:21 -0800)]
rgw: handle 'null' instance when setting delete marker

Don't set 'null' instance for a delete marker. We use empty string for
this specific case.

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agorgw: fix setting of versioned epoch when removing object instance
Yehuda Sadeh [Thu, 8 Jan 2015 01:04:36 +0000 (17:04 -0800)]
rgw: fix setting of versioned epoch when removing object instance

Beforehand if rgwx-versioned-epoch was passed, we ended up always
creating a delete marker. We don't do that now if rgwx-version-id is not
specified, which allows the system user to remove an object instance and
set the epoch appropriately.

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agorgw: add bucket index log flags, use these for marking versioned ops
Yehuda Sadeh [Wed, 7 Jan 2015 00:23:47 +0000 (16:23 -0800)]
rgw: add bucket index log flags, use these for marking versioned ops

We want to mark operations as versioned. This is needed by the sync
agent, so that we know how to handle bucket index log entries. We only
want to apply link-olh and unlink-instance operations when it's
versioned.

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agorgw: fix use of rgw_remove_object() versioning_status param
Yehuda Sadeh [Tue, 6 Jan 2015 23:41:10 +0000 (15:41 -0800)]
rgw: fix use of rgw_remove_object() versioning_status param

Param passed is the versioning status, and not a boolean.

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agorgw, cls_rgw: log versioned operations in bucket index log
Yehuda Sadeh [Tue, 6 Jan 2015 22:12:06 +0000 (14:12 -0800)]
rgw, cls_rgw: log versioned operations in bucket index log

Add the following log ops:
 - link_olh
 - link_olh_del
 - unlink_instance

Log operations if needed. Use current version field in the log entries
to specify versioned epoch.

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agocls_rgw: cleanup, add read_bucket_header()
Yehuda Sadeh [Tue, 6 Jan 2015 19:22:52 +0000 (11:22 -0800)]
cls_rgw: cleanup, add read_bucket_header()

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agocls_rgw: fix rgw_bi_log_entry::dump()
Yehuda Sadeh [Tue, 6 Jan 2015 00:33:36 +0000 (16:33 -0800)]
cls_rgw: fix rgw_bi_log_entry::dump()

Add missing instance field.

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agocls_rgw: bound bi log listing appropriately
Yehuda Sadeh [Tue, 6 Jan 2015 00:32:48 +0000 (16:32 -0800)]
cls_rgw: bound bi log listing appropriately

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agorgw: only retry on ECANCELED before doing the operation
Yehuda Sadeh [Tue, 23 Dec 2014 22:02:16 +0000 (14:02 -0800)]
rgw: only retry on ECANCELED before doing the operation

After we did the operation (e.g., link olh, remove) we don't need to
retry. We got ECANCELED, therefore the operation has already been
applied by another user.

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agorgw: fix olh guarding scheme
Yehuda Sadeh [Tue, 23 Dec 2014 20:11:33 +0000 (12:11 -0800)]
rgw: fix olh guarding scheme

is_olh() will return false if object is not yet an olh, although we
started the process into turning it into one. We should use the
existence of the olh tag instead.

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agorgw_admin: don't reuse -o command line option
Yehuda Sadeh [Tue, 23 Dec 2014 17:38:38 +0000 (09:38 -0800)]
rgw_admin: don't reuse -o command line option

Follow up on code review

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agorgw: multi object delete sends delete marker info
Yehuda Sadeh [Tue, 23 Dec 2014 00:39:15 +0000 (16:39 -0800)]
rgw: multi object delete sends delete marker info

The api requires that we send information about whether the operation
was on a delete marker (either created or removed), and what was the
corresponding version id.

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agorgw: delete obj, handle null instance in all paths
Yehuda Sadeh [Mon, 22 Dec 2014 23:50:42 +0000 (15:50 -0800)]
rgw: delete obj, handle null instance in all paths

When passing rgw_obj structures to the bucket index, we should remove
the "null" instance, pass an empty instance instead.

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agorgw: when deleting object version return -ENOENT if needed
Yehuda Sadeh [Mon, 22 Dec 2014 23:05:18 +0000 (15:05 -0800)]
rgw: when deleting object version return -ENOENT if needed

If can't do bi_get() on the object, we should treat it as non existent
and just return.

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agocls/rgw: when removing delete marker, clean up instance entry
Yehuda Sadeh [Mon, 22 Dec 2014 23:03:04 +0000 (15:03 -0800)]
cls/rgw: when removing delete marker, clean up instance entry

Since we create the instance entry at the bucket index, we should also
remove it. Otherwise we end up with objects that have bucket index
entries, but don't have olh. In these cases we'll be failin operations
on these objects, as their bucket index olh tag will always mismatch the
actual object olh tag.

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agorgw: multi object delete supports versioning
Yehuda Sadeh [Mon, 22 Dec 2014 21:08:50 +0000 (13:08 -0800)]
rgw: multi object delete supports versioning

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agorgw: break out of inifinite ECANCELED state
Yehuda Sadeh [Mon, 22 Dec 2014 18:40:40 +0000 (10:40 -0800)]
rgw: break out of inifinite ECANCELED state

Don't wait forever, we might be in this state due to a bug, so it's
better to abort with EIO at this point.

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agorgw, cls_rgw: conditionally remove olh object
Yehuda Sadeh [Sat, 20 Dec 2014 01:04:30 +0000 (17:04 -0800)]
rgw, cls_rgw: conditionally remove olh object

still not completely working, need to debug

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agorgw, cls_rgw: clean up olh artifacts when dropping last version
Yehuda Sadeh [Fri, 19 Dec 2014 23:29:27 +0000 (15:29 -0800)]
rgw, cls_rgw: clean up olh artifacts when dropping last version

This is still missing one piece, however, it works like this:
1. bucket index log reflects last version was removed (already did that)
2. olh entry is marked as 'pending removal'
 - any new versions coming in now to the olh entry will clear pending
   state
3. rgw conditionally removes olh object (still missing condition check)
 - condition checks should verify olh tag & version, and no pending
   modifications
4. if (2) is successful, rgw sends 'clear olh' request to bucket index
5. bucket index, if still 'pending removal' clears olh and plain entry

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agorgw: dump versioned epoch on system user bucket listing
Yehuda Sadeh [Fri, 19 Dec 2014 00:43:17 +0000 (16:43 -0800)]
rgw: dump versioned epoch on system user bucket listing

The sync agent will need this info.

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agorgw: only set olh attr on actual olh object
Yehuda Sadeh [Thu, 18 Dec 2014 23:16:23 +0000 (15:16 -0800)]
rgw: only set olh attr on actual olh object

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agorgw: no need to set tag on object we're removing
Yehuda Sadeh [Thu, 18 Dec 2014 23:15:29 +0000 (15:15 -0800)]
rgw: no need to set tag on object we're removing

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agocls_rgw: only maintain object if there are preserved xattrs
Yehuda Sadeh [Thu, 18 Dec 2014 21:19:22 +0000 (13:19 -0800)]
cls_rgw: only maintain object if there are preserved xattrs

rgw.obj_remove op doesn't need to keep the object around if there aren't
preserved xattrs found.

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agorgw: limit print length of bufferlist buffer
Yehuda Sadeh [Thu, 18 Dec 2014 19:42:59 +0000 (11:42 -0800)]
rgw: limit print length of bufferlist buffer

These specific buffers are not null terminated.

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agorgw: multipart meta object shouldn't be versioned
Yehuda Sadeh [Thu, 18 Dec 2014 19:41:27 +0000 (11:41 -0800)]
rgw: multipart meta object shouldn't be versioned

This object is already unique due to the upload id associated with it.

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agorgw: remove clutter
Yehuda Sadeh [Thu, 18 Dec 2014 19:39:57 +0000 (11:39 -0800)]
rgw: remove clutter

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agorgw: fix caching for remove_system_obj()
Yehuda Sadeh [Thu, 18 Dec 2014 07:05:25 +0000 (23:05 -0800)]
rgw: fix caching for remove_system_obj()

Align the RGWCache method with the RGWRados method. Also, don't use obj
head removal objclass call, as it's for data objects, not metadata.

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agorgw: fix get_system_obj() caching
Yehuda Sadeh [Thu, 18 Dec 2014 06:52:01 +0000 (22:52 -0800)]
rgw: fix get_system_obj() caching

Originally this was get_obj(), but in the cleanup work this was changed
to get_system_obj() with somewhat different params. Updated cache to use
new interface.

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agorgw: use correct objv_tracker for bucket instance
Yehuda Sadeh [Thu, 18 Dec 2014 01:12:43 +0000 (17:12 -0800)]
rgw: use correct objv_tracker for bucket instance

When trying to create a bucket that already existed, use the
objv_tracker of the newly created instance, and not of the original
bucket.

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agorgw: allow setting of explicit object version on non-versioned bucket
Yehuda Sadeh [Thu, 18 Dec 2014 00:04:10 +0000 (16:04 -0800)]
rgw: allow setting of explicit object version on non-versioned bucket

If system user has set explicit olh version and/or object instance id,
treat it as the bucket was versioned anyway. This can happen with a
racing bucket metadata vs. data sync.

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agocls_rgw: don't increase epoch when converting plain entry
Yehuda Sadeh [Wed, 17 Dec 2014 21:51:24 +0000 (13:51 -0800)]
cls_rgw: don't increase epoch when converting plain entry

Plain entries that are getting converted gets epoch 1, as these are non
versioned ones, and every entry following these will be versioned. Don't
increase the epoch for the operation.

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agorgw: fix a few regressions
Yehuda Sadeh [Thu, 11 Dec 2014 23:43:17 +0000 (15:43 -0800)]
rgw: fix a few regressions

 - need to increase olh epoch if converting plain entry, otherwise
   ordering is skewed
 - if entry is olh (e.g., colocated data + olh), need to make sure we
   write olh idtag xattr
 - completely revalidate obj state after writing it, otherwise attrs
   won't have idtag, and later check to verify if it's olh will fail

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agorgw: move versioning handling to Object::Write::write_meta()
Yehuda Sadeh [Thu, 11 Dec 2014 18:58:23 +0000 (10:58 -0800)]
rgw: move versioning handling to Object::Write::write_meta()

Instead of having to call set_olh() after calling write_meta(), do it
inside that method. This way we (mostly) don't need to care about
versioning outside of it. This required moving bucket info around
instead of just passing the bucket owner.

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agorgw: copy obj does versioning too
Yehuda Sadeh [Wed, 10 Dec 2014 22:39:27 +0000 (14:39 -0800)]
rgw: copy obj does versioning too

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agorgw: propagate version id when putting obj
Yehuda Sadeh [Wed, 10 Dec 2014 18:22:39 +0000 (10:22 -0800)]
rgw: propagate version id when putting obj

A system user can set the rgwx-version-id http param, and it's now sent
to the objclass.

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agorgw: cleaup RGWRados::copy_obj()
Yehuda Sadeh [Tue, 9 Dec 2014 23:44:56 +0000 (15:44 -0800)]
rgw: cleaup RGWRados::copy_obj()

separate into multiple methods.

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agorgw, cls_rgw: provide optional version id, versioned epoch to olh ops
Yehuda Sadeh [Fri, 21 Nov 2014 21:17:25 +0000 (13:17 -0800)]
rgw, cls_rgw: provide optional version id, versioned epoch to olh ops

Let system users specify optional params: rgwx-version-id,
rgwx-versioned-epoch. These will apply to object modification operations
(put object, copy object, delete object), and provide the mechanism that
the sync agent will use to apply remote object changes.
Copy operation hasn't been done yet.

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agocls_rgw: link, unlink olh ops can get epoch
Yehuda Sadeh [Wed, 19 Nov 2014 21:15:26 +0000 (13:15 -0800)]
cls_rgw: link, unlink olh ops can get epoch

If epoch is specified, we need to handle updates differently, only
update the olh itself if passed epoch is newer than the olh current
epoch. Otherwise this is a replay of an older operation that doesn't
affect the olh (or the "current" property).

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agocls_rgw, rgw: pending_log can hold multiple entries per epoch
Yehuda Sadeh [Wed, 19 Nov 2014 01:29:30 +0000 (17:29 -0800)]
cls_rgw, rgw: pending_log can hold multiple entries per epoch

This is needed, so that we can later replay operations, using the epoch
for idempotency.

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agorgw: parse copy location version id
Yehuda Sadeh [Tue, 18 Nov 2014 21:48:11 +0000 (13:48 -0800)]
rgw: parse copy location version id

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agorgw: reduce use of Object::get_obj()
Yehuda Sadeh [Tue, 18 Nov 2014 20:07:15 +0000 (12:07 -0800)]
rgw: reduce use of Object::get_obj()

We should avoid using this one, as it's not going to point at the object
instance in case it's an olh. Only kept the use in
Object::Delete, as we make explicit checks before using it.

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agorgw: Object::Read operations should use state->obj
Yehuda Sadeh [Tue, 18 Nov 2014 19:32:37 +0000 (11:32 -0800)]
rgw: Object::Read operations should use state->obj

and not the provided obj, as it might have been an olh, therefore we
have prepare() that sets the state.obj as the effective object.

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agorgw: Object::Read::read() returns total bytes read
Yehuda Sadeh [Tue, 18 Nov 2014 03:57:36 +0000 (19:57 -0800)]
rgw: Object::Read::read() returns total bytes read

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agorgw: time out pending olh entries
Yehuda Sadeh [Fri, 14 Nov 2014 03:29:30 +0000 (19:29 -0800)]
rgw: time out pending olh entries

remove old pending entries

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agocls_rgw: don't write list entry when converting when deleting
Yehuda Sadeh [Thu, 13 Nov 2014 22:51:11 +0000 (14:51 -0800)]
cls_rgw: don't write list entry when converting when deleting

when converting the plain entry into a versioned entry, don't write the
list entry if this is a delete op with a null instance.

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agocls_rgw: revise null object instance handling, versioned epoch
Yehuda Sadeh [Thu, 13 Nov 2014 22:12:53 +0000 (14:12 -0800)]
cls_rgw: revise null object instance handling, versioned epoch

Separate the versioned epoch from the object entry version, since in the
case of null instane entries the object version actually contains
meaningful data that can be overwritten.
Keep separate instance entries for null versioned object and delete
marker, since the two can coexist for a period of time. With suspended
versioning bucket, when deleting a null versioned object we create an
delete marker, and set the olh log to remove the object instance, which
will make the gateway send a removal request. Had we kept the same
entry it'll remove the wrong entry.

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agorgw: read bucket owner when following olh if pending entries
Yehuda Sadeh [Tue, 11 Nov 2014 01:09:21 +0000 (17:09 -0800)]
rgw: read bucket owner when following olh if pending entries

We need to read the bucket owner, so that we'd be able to apply any
changes to the object. Bucket owner is needed for quota related
accounting.

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agorgw: remove warning
Yehuda Sadeh [Tue, 11 Nov 2014 00:15:49 +0000 (16:15 -0800)]
rgw: remove warning

This cleanup is not essential at this point

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agorgw: remove unused code
Yehuda Sadeh [Fri, 7 Nov 2014 06:00:27 +0000 (22:00 -0800)]
rgw: remove unused code

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agocls_rgw: clean up compilation warnings
Yehuda Sadeh [Fri, 7 Nov 2014 05:52:00 +0000 (21:52 -0800)]
cls_rgw: clean up compilation warnings

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agocls_rgw: implement dump() and generate test instances
Yehuda Sadeh [Fri, 7 Nov 2014 05:46:42 +0000 (21:46 -0800)]
cls_rgw: implement dump() and generate test instances

Add missing methods for some cls_rgw op types.

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agocls_rgw: guard certain operations using olh tag
Yehuda Sadeh [Fri, 7 Nov 2014 00:54:07 +0000 (16:54 -0800)]
cls_rgw: guard certain operations using olh tag

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agorgw, cls_rgw: improve olh atomicity
Yehuda Sadeh [Tue, 4 Nov 2014 01:04:46 +0000 (17:04 -0800)]
rgw, cls_rgw: improve olh atomicity

Add olh_tag attr to olh object, and use it instead of obj_tag as object
data may be colocated with the olh. Use the olh_tag to guard various
operations.

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agorgw: encode timestamp in pending olh info
Yehuda Sadeh [Mon, 3 Nov 2014 22:29:58 +0000 (14:29 -0800)]
rgw: encode timestamp in pending olh info

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agocls_rgw: remove instance entry when removing delete marker
Yehuda Sadeh [Fri, 31 Oct 2014 00:15:26 +0000 (17:15 -0700)]
cls_rgw: remove instance entry when removing delete marker

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agorgw: send x-amz-version-id and x-amz-delete_marker header fields
Yehuda Sadeh [Fri, 31 Oct 2014 00:00:02 +0000 (17:00 -0700)]
rgw: send x-amz-version-id and x-amz-delete_marker header fields

send these fields on obj delete as defined by the api. This required
adding an index read so that we can identify whether an instance is
actually a delete marker.

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agorgw: add dump_string_header()
Yehuda Sadeh [Thu, 30 Oct 2014 22:16:13 +0000 (15:16 -0700)]
rgw: add dump_string_header()

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agocls_rgw: add missing cls_cxx_create()
Yehuda Sadeh [Thu, 30 Oct 2014 21:14:53 +0000 (14:14 -0700)]
cls_rgw: add missing cls_cxx_create()

This was found during code read, not necessarily a real issue, however,
we counted on the object being created implicitly by setting xattrs on
it. Instead make sure the object is created.

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agorgw, cls_rgw: fix update of olh to reflect non existing object
Yehuda Sadeh [Wed, 29 Oct 2014 22:37:58 +0000 (15:37 -0700)]
rgw, cls_rgw: fix update of olh to reflect non existing object

need to update olh appropriately when removing the last reference of an
object.

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agocls_rgw: inc olh epoch when updating log
Yehuda Sadeh [Wed, 29 Oct 2014 21:28:50 +0000 (14:28 -0700)]
cls_rgw: inc olh epoch when updating log

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agorgw: fix access to object through the null instance
Yehuda Sadeh [Wed, 29 Oct 2014 00:01:34 +0000 (17:01 -0700)]
rgw: fix access to object through the null instance

Beforehand we were following olh if the explicit 'null' instance was
specified.

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agorgw: adjust versioning enable/suspend api
Yehuda Sadeh [Tue, 28 Oct 2014 23:14:10 +0000 (16:14 -0700)]
rgw: adjust versioning enable/suspend api

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agorgw: propagate object owner and mtime for deletion marker
Yehuda Sadeh [Tue, 28 Oct 2014 20:45:12 +0000 (13:45 -0700)]
rgw: propagate object owner and mtime for deletion marker

deletion marker needs to have object owner and mtime properties.

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agorgw, cls_rgw: multiple changes related to obj removal
Yehuda Sadeh [Tue, 28 Oct 2014 00:09:57 +0000 (17:09 -0700)]
rgw, cls_rgw: multiple changes related to obj removal

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agorgw: send "null" version id if needed
Yehuda Sadeh [Mon, 27 Oct 2014 20:50:46 +0000 (13:50 -0700)]
rgw: send "null" version id if needed

on bucket list versions

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agoformatter: no need for dynamic allocation
Yehuda Sadeh [Fri, 24 Oct 2014 22:18:02 +0000 (15:18 -0700)]
formatter: no need for dynamic allocation

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agoosd: fix filter_prefix scoping in omap_get_vals
Yehuda Sadeh [Fri, 24 Oct 2014 22:07:13 +0000 (15:07 -0700)]
osd: fix filter_prefix scoping in omap_get_vals

filter_prefix should only affect the case where it's greater than
start_after, otherwise we'll end up with a key equals to start_after.

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agorgw, cls_rgw: add bi put
Yehuda Sadeh [Wed, 22 Oct 2014 01:30:23 +0000 (18:30 -0700)]
rgw, cls_rgw: add bi put

An admin operation to set bucket index entries.

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agocls_rgw, rgw-admin: create bi list operation
Yehuda Sadeh [Tue, 21 Oct 2014 23:35:55 +0000 (16:35 -0700)]
cls_rgw, rgw-admin: create bi list operation

Can now list bucket index entries that correspond to a single key. This
is useful when debugging versioned objects issues.

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agocls_rgw, rgw-admin: move bi_get() entry encoding to cls
Yehuda Sadeh [Tue, 21 Oct 2014 19:42:54 +0000 (12:42 -0700)]
cls_rgw, rgw-admin: move bi_get() entry encoding to cls

Create a new structure to hold entry info, so that we can later creata a
bi_list() operation.

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agocls_rgw: add missing flags encoding to rgw_bucket_dir_entry::dump()
Yehuda Sadeh [Tue, 21 Oct 2014 18:58:05 +0000 (11:58 -0700)]
cls_rgw: add missing flags encoding to rgw_bucket_dir_entry::dump()

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agocommon, rgw: json escaping gets input buf size
Yehuda Sadeh [Tue, 21 Oct 2014 18:35:50 +0000 (11:35 -0700)]
common, rgw: json escaping gets input buf size

We now deal with strings that embed a null character.

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agorgw-admin, cls_rgw: add bi_get objclass operation
Yehuda Sadeh [Mon, 20 Oct 2014 22:11:12 +0000 (15:11 -0700)]
rgw-admin, cls_rgw: add bi_get objclass operation

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agocls_rgw: keep null-versioned object as versioned object
Yehuda Sadeh [Sat, 18 Oct 2014 00:08:19 +0000 (17:08 -0700)]
cls_rgw: keep null-versioned object as versioned object

when olh is created. Mark the object as such, so that we'll know to
handle it correctly. This is needed so that we could handle the 'null'
version as required.
Still doesn't work correctly.

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agorgw: follow olh where needed
Yehuda Sadeh [Fri, 17 Oct 2014 18:08:13 +0000 (11:08 -0700)]
rgw: follow olh where needed

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agorgw: unlink obj instance
Yehuda Sadeh [Fri, 17 Oct 2014 00:15:38 +0000 (17:15 -0700)]
rgw: unlink obj instance

use new objclass method

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agocls_rgw: unlink object instance
Yehuda Sadeh [Thu, 16 Oct 2014 23:38:49 +0000 (16:38 -0700)]
cls_rgw: unlink object instance

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agocls_rgw: update olh log when unlinking entry
Yehuda Sadeh [Thu, 16 Oct 2014 21:26:37 +0000 (14:26 -0700)]
cls_rgw: update olh log when unlinking entry

Need to update log so that later client will be able to appropriately
remove the object.

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agocls_rgw: more cleanup
Yehuda Sadeh [Thu, 16 Oct 2014 20:46:05 +0000 (13:46 -0700)]
cls_rgw: more cleanup

move versioned data and olh handling into class methods.

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agocls_rgw: more cleanup
Yehuda Sadeh [Thu, 16 Oct 2014 17:22:14 +0000 (10:22 -0700)]
cls_rgw: more cleanup

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agocls_rgw: reorganize rgw_bucket_link_olh()
Yehuda Sadeh [Thu, 16 Oct 2014 16:43:58 +0000 (09:43 -0700)]
cls_rgw: reorganize rgw_bucket_link_olh()

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agorgw: convert RGWRados::get_attr() to new interface
Yehuda Sadeh [Tue, 14 Oct 2014 23:10:05 +0000 (16:10 -0700)]
rgw: convert RGWRados::get_attr() to new interface

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agorgw: switch get_obj_iterate() to new interface
Yehuda Sadeh [Tue, 14 Oct 2014 20:52:41 +0000 (13:52 -0700)]
rgw: switch get_obj_iterate() to new interface

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agorgw: remove unused code
Yehuda Sadeh [Fri, 10 Oct 2014 00:07:41 +0000 (17:07 -0700)]
rgw: remove unused code

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agorgw: purge intent log
Yehuda Sadeh [Fri, 10 Oct 2014 00:00:36 +0000 (17:00 -0700)]
rgw: purge intent log

We don't use the intent log anymore, just remove it.

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agorgw: adjust to new interfaces
Yehuda Sadeh [Thu, 9 Oct 2014 03:33:57 +0000 (20:33 -0700)]
rgw: adjust to new interfaces

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agorgw: s/RGWRados::ObjectCtx/RGWObjectCtx
Yehuda Sadeh [Thu, 9 Oct 2014 03:20:43 +0000 (20:20 -0700)]
rgw: s/RGWRados::ObjectCtx/RGWObjectCtx

Can't forward declare nested class.

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agorgw: clean up system obj interfaces
Yehuda Sadeh [Wed, 8 Oct 2014 00:07:22 +0000 (17:07 -0700)]
rgw: clean up system obj interfaces

Create a new structure to use, RGWRados::SystemObject, similar to the
previous changes made for the data objects.

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agorgw: change RGWRados::get_attr()
Yehuda Sadeh [Tue, 7 Oct 2014 22:34:29 +0000 (15:34 -0700)]
rgw: change RGWRados::get_attr()

This is an interim fix, will need to make it work similarly to the other
calls.

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agorgw: rework prepare_get_obj(), get_obj()
Yehuda Sadeh [Tue, 7 Oct 2014 00:10:42 +0000 (17:10 -0700)]
rgw: rework prepare_get_obj(), get_obj()

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agorgw: remove more unused code
Yehuda Sadeh [Mon, 6 Oct 2014 22:36:22 +0000 (15:36 -0700)]
rgw: remove more unused code

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agorgw: fix missing state initalization
Yehuda Sadeh [Mon, 6 Oct 2014 22:28:06 +0000 (15:28 -0700)]
rgw: fix missing state initalization

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agorgw: switch RGWRados::delete_obj() to new interface
Yehuda Sadeh [Mon, 6 Oct 2014 22:27:01 +0000 (15:27 -0700)]
rgw: switch RGWRados::delete_obj() to new interface

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agorgw: remove unused code
Yehuda Sadeh [Mon, 6 Oct 2014 21:21:06 +0000 (14:21 -0700)]
rgw: remove unused code

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agorgw: remove old index update calls
Yehuda Sadeh [Mon, 6 Oct 2014 21:02:04 +0000 (14:02 -0700)]
rgw: remove old index update calls

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agorgw: get rid of put_obj_meta(), replace with put_system_obj()
Yehuda Sadeh [Sat, 4 Oct 2014 04:49:45 +0000 (21:49 -0700)]
rgw: get rid of put_obj_meta(), replace with put_system_obj()

Last use of put_obj_meta() was for system object, simplify it for that
specific use case and rename.

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agorgw: don't use put_system_obj() for data objects
Yehuda Sadeh [Sat, 4 Oct 2014 04:28:23 +0000 (21:28 -0700)]
rgw: don't use put_system_obj() for data objects

Use the new interface instead.

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agorgw: pass around object context refrences, remove unused code
Yehuda Sadeh [Fri, 3 Oct 2014 23:59:26 +0000 (16:59 -0700)]
rgw: pass around object context refrences, remove unused code

We want to make it clear that the object context is required for
non-system objects, pass it by reference (rather than by pointer). Make
the put processors get it as a constructor param and keep it on the
object.
Still haven't updated everything, as some stuff is going to change
anyway.
Remove the plain put processor, as it is not used anymore.

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>