| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
Tests that the op_send_replica performance counter exists.
Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
|
|
|
|
|
|
|
|
|
|
| |
Constructs a unique /tmp/path admin socket for the client before each
unit test. Adds an accessor for lazily reading performance counters to
grab the number of ops sent to a replica by the objecter.
Enables json_spirit MVALUE to make finding the value in the JSON easier.
Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
|
|
|
|
|
|
|
|
|
| |
Creates a non-installed static libtools_common library from
tools/common.cc and moves do_admin_socket(..) into the library from
tools/ceph.cc. This routine is useful in the unit tests for connecting
to and querying an admin socket.
Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
|
|
|
|
|
|
|
|
| |
Adds l_osdc_op_send_replica performance counter to count the number of
operations queued up on a connection to an osd that isn't the primary
for the operation being handled.
Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch does two things. First, it uses value-parameterized version
of the test fixture which allows us to pass in a boolean flag that
enables/disable read from replica feature. We create two instances of
the fixture (true and false), so we run all the tests twice, once for
each state.
Existing tests use getpid() to create unique file names, but often don't
clean up after themselves. Since each tests is run in the same process
more than once, the names are no longer unique to the test instance. To
handle this case we change the fixture to construct a unique directory
that the mount is rooted in to create a clean room directory for each
test.
Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
|
|
|
|
|
|
|
|
|
| |
Adds a test fixture which creates and destroys a ceph mount
automatically for each test. This lets us easily alter the mount before
each test runs. We'll use this to enable/disable local reads for each
test.
Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
|
|
|
|
|
|
|
| |
This will avoid having to construct a new header file to be shared
between files with tests when the test fixture is added.
Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
|
|
|
|
|
|
|
| |
ceph_shutdown will hang unless we close the directory.
Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
Signed-off-by: Sam Lang <sam.lang@inktank.com>
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
In commit 20496b8d2b2c3779a771695c6f778abbdb66d92a we treat a CALL as
different from a normal "read", but we did not adjust the behavior
determined by the RD bit in the op. We tried to fix that in
91e941aef9f55425cc12204146f26d79c444cfae, but changing the op code breaks
compatibility, so that was reverted.
Instead, special-case CALL in the helper--the only point in the code that
actually checks for the RD bit. (And fix one lingering user to use that
helper appropriately.)
Fixes: #3731
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Dan Mick <dan.mick@inktank.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This reverts commit 91e941aef9f55425cc12204146f26d79c444cfae.
We cannot change this op code without breaking compatibility
with old code (client and server). We'll have to special case
this op code instead.
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Dan Mick <dan.mick@inktank.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This optimization allowed the primary to push a clone as a single push in the
case that the head object on the replica is old and happens to be at the same
version as the clone. In general, using head in clone_subsets is tricky since
we might be writing to head during the push. calc_clone_subsets does not
consider head (probably for this reason). Handling the clone from head case
properly would require blocking writes on head in the interim which is probably
a bad trade off anyway.
Because the old-head optimization only comes into play if the replica's state
happens to fall on the last write to head prior to the snap that caused the
clone in question, it's not worth the complexity.
Fixes: #3698
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The op_seq file is the starting point for journal replay. For stable btrfs
commit mode, which is using a snapshot as a reference, we should write this
file before we take the snap. We normally ignore current/ contents anyway.
On non-btrfs file systems, however, we should only write this file *after*
we do a full sync, and we should then fsync(2) it before we continue
(and potentially trim anything from the journal).
This fixes a serious bug that could cause data loss and corruption after
a power loss event. For a 'kill -9' or crash, however, there was little
risk, since the writes were still captured by the host's cache.
Fixes: #3721
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Samuel Just <sam.just@inktank.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Normally, we batch up peering messages until the end of
process_peering_events to allow us to combine many notifies, etc
to the same osd into the same message. However, old osds assume
that the actiavtion message (log or info) will be _dispatched
before the first sub_op_modify of the interval. Thus, for those
peers, we need to send the peering messages before we drop the
pg lock, lest we issue a client repop from another thread before
activation message is sent.
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
|
| |\
| | |
| | |
| | | |
Signed-off-by: Samuel Just <sam.just@inktank.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Push osdmaps to PGs in separate method from activate_map() (whose name
is becoming less and less accurate).
Signed-off-by: Sage Weil <sage@inktank.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The OSD deliberate consumes and processes most OSDMaps from while it
was down before it marks itself up, as this is can be slow. The new
threading code does this asynchronously in peering_wq, though, and
does not let it drain before booting the OSD. The OSD can get into
a situation where it marks itself up but is not responsive or useful
because of the backlog, and only makes the situation works by
generating more osdmaps as result.
Fix this by calling activate_map() even when booting, and when booting
draining the peering_wq on each call. This is harmless since we are
not yet processing actual ops; we only need to be async when active.
Fixes: #3714
Signed-off-by: Sage Weil <sage@inktank.com>
|
| | |
| | |
| | |
| | | |
Signed-off-by: Sage Weil <sage@inktank.com>
|
| |/
| |
| |
| | |
Signed-off-by: Sage Weil <sage@inktank.com>
|
| |
| |
| |
| | |
Signed-off-by: Sage Weil <sage@inktank.com>
|
| |
| |
| |
| |
| |
| |
| |
| | |
Prevents race between messages being dispatched to the client after the
client has been free'd.
Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
Reviewed-by: Sage Weil <sage@inktank.com>
|
| |
| |
| |
| |
| |
| |
| |
| | |
do_copy was different from the others; call pc.fail() on error and
do not call pc.finish().
Fixes: #3729
Signed-off-by: Dan Mick <dan.mick@inktank.com>
|
|\ \
| | |
| | |
| | | |
Reviewed-by: Dan Mick <dan.mick@inktank.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This eliminates a window in which a race could occur when we have an
image open but no watch established. The previous fix (using
assert_version) did not work well with resend operations.
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Using assert version for linger ops doesn't work with retries,
since the version will change after the first send.
This reverts commit e1776809031c6dad441cfb2b9fac9612720b9083.
Conflicts:
qa/workunits/rbd/watch_correct_version.sh
|
| | |
| | |
| | |
| | | |
Signed-off-by: John Wilkins <john.wilkins@inktank.com>
|
|\ \ \
| | | |
| | | | |
Minor clarification in docs.
|
| | | |
| | | |
| | | |
| | | |
| | | | |
Clarified when it's necessary to use the setting:
filestore xattr use omap = true
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
on splitting.
Fixes: #3555
Signed-off-by: John Wilkins <john.wilkins@inktank.com>
|
| | | |
| | | |
| | | |
| | | | |
Signed-off-by: John Wilkins <john.wilkins@inktank.com>
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Fixes: #3686
Signed-off-by: John Wilkins <john.wilkins@inktank.com>
|
|/ / /
| | |
| | |
| | | |
Signed-off-by: John Wilkins <john.wilkins@inktank.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
A multi-client dbench run doesn't work over NFS,
see bug #3718. Make single client dbench available.
Signed-off-by: David Zafman <david.zafman@inktank.com>
|
|\ \ \
| | |/
| |/| |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
We weren't locking m_flush_mutex properly, which in turn was leading to
racing threads calling dump_recent() and garbling the crash dump output.
Backport: bobtail, argonaut
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Dan Mick <dan.mick@inktank.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
With the changes from 856f32ab, the cfuse.init call returns
a _positive_ errno, which was getting ignored. Also, if an
error occurs during cfuse.init(), we need to teardown the client
mount.
Signed-off-by: Sam Lang <sam.lang@inktank.com>
|
| |\ \
| | | |
| | | |
| | | |
| | | | |
Reviewed-by: Samuel Just <sam.just@inktank.com>
Backport: bobtail
|
| | | |
| | | |
| | | |
| | | | |
Signed-off-by: Sage Weil <sage@inktank.com>
|
| | | |
| | | |
| | | |
| | | | |
Signed-off-by: Sage Weil <sage@inktank.com>
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Limit size of each aio submission to IOV_MAX-1 (to be safe). Take care to
only mark the last aio with the seq to signal completion.
Signed-off-by: Sage Weil <sage@inktank.com>
|
| | | |
| | | |
| | | |
| | | | |
Signed-off-by: Sage Weil <sage@inktank.com>
|
|\ \ \ \ |
|
| | |_|/
| |/| |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
The pjd script now uses the latest version of pjd
with an additional test for opening a non-existent
file.
Signed-off-by: Sam Lang <sam.lang@inktank.com>
|
| | | |
| | | |
| | | |
| | | | |
Signed-off-by: John Wilkins <john.wilkins@inktank.com>
|
|/ / /
| | |
| | |
| | | |
Signed-off-by: John Wilkins <john.wilkins@inktank.com>
|
| | |
| | |
| | |
| | | |
Signed-off-by: John Wilkins <john.wilkins@inktank.com>
|
| | |
| | |
| | |
| | | |
Signed-off-by: John Wilkins <john.wilkins@inktank.com>
|
|\ \ \
| |/ /
|/| | |
|
| | |
| | |
| | |
| | | |
Signed-off-by: Sage Weil <sage@inktank.com>
|
| | |
| | |
| | |
| | | |
Signed-off-by: Sage Weil <sage@inktank.com>
|