For testing, we may choose randomized length of extent to allocate,
which means we could trim down the length to 0.
Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
Perviously as zone_size_block and span_size are identical, so we could use
span_size only to simplify the calcuation.
Now that the zone_size_block and span_size are both configurable, so
it is necessary to treat them respectively.
Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
These targets depend on libgmock_main.la which is not built during
a default build.
Fixes: http://tracker.ceph.com/issues/16646
Signed-off-by: Brad Hubbard <bhubbard@redhat.com>
This only works reliably with the
objecter_retry_writes_after_first_reply setting, so make it part of
the test setup.
Signed-off-by: Josh Durgin <jdurgin@redhat.com>
This is needed to turn on persisting write errors, since older OSDs
won't be able to handle them.
Other features for kraken could potentially use this as well.
Signed-off-by: Josh Durgin <jdurgin@redhat.com>
This prevents reordering guarded writes or deletes.
Without this, the following sequence:
delete foo -> -ENOENT
write foo -> success
(client connection fails)
resend delete foo -> success, object deleted
resend write foo -> success - dup op, so no write performed
results in the object not existing, instead of containing data. After
this change, both delete and write are detected as dups and the
original ordering is preserved.
Fixes: http://tracker.ceph.com/issues/14468
Signed-off-by: Josh Durgin <jdurgin@redhat.com>
This is required to prevent re-ordering of guarded writes or deletes
in the presence of network failures and resends.
Use the existing submit_log_entries() method to initiate a repop that
only updates the pg log.
Keep the write error semantics close to the existing implementation -
if we have a buffer, return it, but do not persist the buffer for now.
Refs: http://tracker.ceph.com/issues/14468
Signed-off-by: Josh Durgin <jdurgin@redhat.com>
Dup detection only needs them indexed by version, and keeping them out
of the object index prevents error entries from contributing to the
missing set during recovery.
Signed-off-by: Josh Durgin <jdurgin@redhat.com>
This will store write error codes for use in dup op detection.
A few places use checks assuming is_update() or is_delete() are
opposites - fix those to ignore or consider errors, as appropriate.
Refs: http://tracker.ceph.com/issues/14468
Signed-off-by: Josh Durgin <jdurgin@redhat.com>
RGWDataSyncShardCR will only allocate an error_repo if it's doing
incremental sync, so RGWDataSyncSingleEntryCR needs to guard against a
null error_repo
also, RGWDataSyncShardCR::stop_spawned_services() was dropping the last
reference to the error_repo before calling drain_all(), which meant that
RGWDataSyncSingleEntryCR could still be holding a pointer. now uses a
boost::intrusive_ptr in RGWDataSyncSingleEntryCR to account for its
reference
Fixes: http://tracker.ceph.com/issues/16603
Signed-off-by: Casey Bodley <cbodley@redhat.com>
use rgw_bucket_shard to track buckets, which includes tenant id
Fixes: http://tracker.ceph.com/issues/16469
Signed-off-by: Casey Bodley <cbodley@redhat.com>
to work around the ambiguity of parsing tenant: and :shard in the same
bucket instance metadata key, use tenant/ instead
to preserve backward compatibility with existing objects, new helper
function rgw_bucket_instance_key_to_oid() converts this / back to a :
before being used as an object name
Signed-off-by: Casey Bodley <cbodley@redhat.com>
Prior to this change, the documention instructed administrators to
delete rulesets and users, but did not go into details regarding how to
do that.
Add example commands that admins may use to search for rulesets and
users that might reference the to-be-deleted pool.
Signed-off-by: Ken Dreyer <kdreyer@redhat.com>
simple messenger's prefetch buffer is ms_tcp_prefetch_max_size.
Don't cap it with TCP_PREFETCH_MIN_SIZE in the async messenger.
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
state_buffer is 4096 bytes long, while connect authorizer can be
arbitrarily big - an OSD service ticket with lots of per-pool or
per-namespace caps is one example. We end up scribbling on invalid
memory past the state_buffer and eventually crash.
Move authorizer_bl up into connection and read directly into it.
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
this fixes the build on armf.
on 32bit platforms, cstdint is very likely to
typedef long long int int64_t;
this results in compilation error like
`common/strtol.cc:190:75: error: duplicate explicit instantiation of 'T
strict_si_cast(const char, std::string) [with T = long long int;
std::string = std::basic_string]'
[-fpermissive]
template int64_t strict_si_cast(const char *str, std::string *err);
^`
we can address this by instantiate the primitive type of `long long`
instead of `in64_t`.
Fixes: http://tracker.ceph.com/issues/16398
Signed-off-by: Kefu Chai <kchai@redhat.com>
librados examples: link and include from current source tree by default.
Reviewed-by: Josh Durgin <jdurgin@redhat.com>
Reviewed-by: Kefu Chai <kchai@redhat.com>