Returning the current version for the pgid and last_user_version makes
some sense here.
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
All other MOSDOpReply creators do this, with the exception of the pg
op.
Fixes: #6222
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
Initial pass at COPY_FROM implementation. This uses COPY_GET to read an
object from another OSD and write it locally. It chunks the read but
accumulates it all in-memory and commits it at once, so it is only suitable
for smaller objects.
Signed-off-by: Sage Weil <sage@inktank.com>
This operation will copy an entire object (data, attrs, omap)
atomically. If the src_version does not match the source object, or
the source object is updated while the copy is in progress, we will
fail with a suitable error code. By atomic we mean that it will either
successfully copy the entire object in its entirety or it will fail (and
require no cleanup).
Add to C++ librados API only for now.
Signed-off-by: Sage Weil <sage@inktank.com>
Conflicts:
src/include/ceph_strings.cc
src/include/rados.h
src/osd/osd_types.cc
This was broken by the refactor in 96aaa5e3a3
and can make us hang.
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Samuel Just <sam.just@inktank.com>
Backport: dumpling
Moving back the watch initialization after the zone init,
as the zone info holds the control pool name. Since zone
init might need to create a new system object (that needs
to distribute cache), don't try to distribute cache if
watch is not yet initialized.
Reviewed-by: Sage Weil <sage@inktank.com>
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
Following the changes to when we set or increase the user_version, we
want to continue to return the best lower bound we can on the version
of any newly-created object. For ENOENT replies that means returning
info.last_user_version instead of the (potentially-zero) ctx->user_at_version.
Similarly, for cls_current_version we want to return the last version on
the PG rather than the last update to the object in order to provide
sensible version ordering across object deletes and creates.
Update the versions doc so it continues to be precise.
Signed-off-by: Greg Farnum <greg@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
Leave ctx->user_at_version set to the previous oi.user_version unless/until
we find that ctx->user_modify is true.
Signed-off-by: Sage Weil <sage@inktank.com>
We may have pg entries that do not increase the user_version at all (i.e.,
they may be 0). Do not update the last_user_version in that case as we
need it to remain an upper bound.
Signed-off-by: Sage Weil <sage@inktank.com>
Make sure we don't dereference a NULL pointer. Note that we check a
bit further down if the target pool does not exist and return the proper
error.
Bug was reliably reproduced by
./ceph_test_rados_api_watch_notify --gtest_filter=LibRadosWatchNotify.WatchNotifyTimeoutTestPP
Signed-off-by: Sage Weil <sage@inktank.com>
- Added config option to allow S3 to use Keystone auth
- Implemented JSONDecoder for KeystoneToken
- RGW_Auth_S3::authorize now uses rgw_store_user_info on keystone auth
- Minor fix in get_canon_resource; dout is now after the assignment
Reviewed-by: Yehuda Sadeh<yehuda@inktank.com>
Signed-off-by: Roald J. van Loon <roaldvanloon@gmail.com>
This sometimes gives a completely random uint64_t value, because it is
potentially used uninitialized.
Signed-off-by: Roald J. van Loon <roaldvanloon@gmail.com>
This saves us a bit of work, since we will discard the op anyway if
we aren't primary (or even if we become primary again before we get to
it).
Signed-off-by: Sage Weil <sage@inktank.com>
Add new rados operation to copy all user-visible content for an object
in a simple, safe way. Use a new object_copy_cursor_t to keep track of
our position.
Signed-off-by: Sage Weil <sage@inktank.com>
Separate the processing of an OpContext from the preamble and
allocation, so that we can delay the execution for some ops (like the
COPYFROM operation we're about to add).
Signed-off-by: Sage Weil <sage@inktank.com>
Feed every map message we see (that isn't discarded for some other
reason) to the Objecter. It has the same continuity requirements that
the OSD has, so it should be satisfied with what we get. It can also
request maps via our MonClient.
Signed-off-by: Sage Weil <sage@inktank.com>
Replace ->get_source().is_osd() checks and instead see if it is the
cluster_messenger so that we do not confuse ourselves when we get
legit requests from other OSDs on our public interface.
Signed-off-by: Sage Weil <sage@inktank.com>
We will give the OSD's Objecter its own messenger so that it does not
interfere with the OSD when it marks things up or down.
Signed-off-by: Sage Weil <sage@inktank.com>