Fixes: #8251
Previously we were indexing the replica log only by bucket name, even
though we were provided with the bucket instance id. Fix that, and also
add the option to be able to revert to the old behavior. For
radosgw-admin we can do it if --replicalog-index-by-instance=false is
provided. For the replica log REST api we now have the index-by-instance
http param (defaults to true).
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
Add new header_crc and data_crc configuration booleans, and use
them consistently to govern whether CRC is performed in the
Message encode, decode, and transit paths.
Learn from 2ffacbe6ef
Signed-off-by: Haomai Wang <haomaiwang@gmail.com>
So that we can get out a particular subsystem
or particular counter without dumping
everything. Should make tests that watch perf
counters much less spammy!
`logger` and `counter` params are used with
an exact comparison here but the interface
should be amenable to extending to e.g. globbing
if we wanted to in the future.
Also tidy up some iterator while()s into for()s.
Signed-off-by: John Spray <john.spray@redhat.com>
The test was removed in 1189138 (mon: make ceph tell mon.* version
work) as it began to fail due to #10439. After it fixed in c4548f6
(pybind: ceph_argparse: validate incorrectly formed targets), the test
can be restored.
Signed-off-by: Mykola Golub <mgolub@mirantis.com>
Google Testing Framework is included by default within the Google
C++ Mocking Framework. Update makefiles to use new gmock/gtest
libraries and remove old gtest source code.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
The original trim header update code was using blocking IO to
update the header. After migrating to an asynchronous trim
which performs all work in librados callbacks, it exposed a
potential deadlock in the librados_test_stub when attempting
to do blocking IO within a librados callback. This commit
changes the header update to use AIO.
Fixes: #10637
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
The 'src/gmock' directory is extracted from the 1.7.0
release located at https://code.google.com/p/googlemock/
gmock is licensed under the New BSD license, see
src/gmock/LICENSE
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
On my box LC_ALL=C# includes the '#' in the value without
a space between C and '#' and things go completely bonkers.
Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
* Use set -e to detect errors
* no need to retry cleanup in a loop now that rbd-fuse closes images
* use --no-progress for long-running operations
* add output at the start of each test
Signed-off-by: Josh Durgin <jdurgin@redhat.com>
Close all open images and librados state. This cleans up watches so we
don't need to wait for them to timeout in tests.
rbd-fuse is still a rough prototype, but this makes it slightly more
usable for testing.
Signed-off-by: Josh Durgin <jdurgin@redhat.com>
Ensure that no more than one outstanding progress callback
is queued for notification. This will allow remote progress
updates to be sent at a rate in which all watch/notify
clients can support.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
When image locking is enabled, snapshot create, resize, and
flatten are coordinated with the lock owner. Previously, if the
the lock owner changed during one of this operations, the
operation would fail. Now librbd will attempt to restart the
operation with the new lock owner (or become the owner itself).
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
The resize, flatten, and snapshot maintenance operations now
use the new assert_lock feature to ensure that the current
client still owns the header lock when making changes.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
The assert_locked operation can be combined with other
RADOS ops to prevent an update to a locked object when
the client doesn't own the lock. It will not attempt to
acquire the lock if the object is not currently locked.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
When the exclusive lock feature is enabled, only a single client can
modify the image. As a result, certain maintenance activities
need to be proxied from the maintenance client to the active
leader.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
Snapshot, flatten, and resize maintenance operations can now
be coordinated via the client holding the exclusive lock for the
image.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
Resize and flatten now have async versions. The existing resize
and flatten operations now use the async versions internally. The
async operations will be used by the client holding the exclusive
lock when it receives maintenance requests from other clients.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
The trim completion context was not properly invoked if the
image's exclusive lock was lost between issuing a librados call
and receiving its completion.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>