If our map get_version check needs to be retried, tell the
is_latest_map() callers instead of giving returning 0 ("no").
Fixes: #3049
Signed-off-by: Sage Weil <sage@inktank.com>
We should requeue the dups along with the originals. This avoids
situations where, after requeue, the dups are reordered with respect to
each other. For example:
- client sends A, B, C
- osd receives A
- connection drops
- client sends A', B', C'
- osd puts A' in waiting_for_ondisk, starts B' and C'
- on_change() requeues everything
Final queue order (before this patch) is
A, B', C', A'
After this patch, the resulting queue order is
A, A', B', C'
Or somewhat more generally, it might be:
A, A', B, B', B'', C', C'', D'', ....
Fixes (another source of): #2947
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Samuel Just <sam.just@inktank.com>
was mishandling parsing of binary flag arguments.
also, fix argument parsing and update radosgw-admin
cli test reference.
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
Add a garbage collector thread that is responsible for clean
up of clutter. When removing an object, store info about the
leftovers in a special gc map (via rgw objclass). A new
radosgw-admin commands to list objects in gc, and to run the
gc process manually. Also, gc processors can run in parallel,
however, each will handle a single gc shard (synchronized
using lock objclass).
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
We don't shut down all threads, and the surviving ones fight with
exit()'s teardown. Kludge until we have a clean shutdown process.
Signed-off-by: Sage Weil <sage@inktank.com>
Showing the current state and saying it is stuck doesn't tell you how it
is stuck (e.g. stuck unclean, stuck inactive, etc.). Also include the
stuck duration.
Fixes: #2876
Signed-off-by: Sage Weil <sage@inktank.com>
This is a fallback for when a user wishes to delete ALL benchmark files
matching a particular prefix. In the fast case, a metadata file tells us
enough to quickly delete the files in parallel. This is the slow case,
where each file's name must be checked against the prefix.
Signed-off-by: Mike Ryan <mike.ryan@inktank.com>
This intelligently removes objects from a rados or rest benchmark run by
using parameters from the metadata file.
Signed-off-by: Mike Ryan <mike.ryan@inktank.com>
Store metadata for each benchmark run so that the objects can be
efficiently removed at a later point.
Signed-off-by: Mike Ryan <mike.ryan@inktank.com>
Per #2477, objects created during rados or rest write benchmark are
automatically cleaned up after the test. They can optionally be left in
place.
Signed-off-by: Mike Ryan <mike.ryan@inktank.com>
Lossless peers (osd<->osd, mds<->mds, mon<->mon) never reset sessions
to each other. In the osd and mds cases, there is no need to check for
session resets. More significantly, these checks can trigger with an
unfortunately sequence of socket failures. In particular,
- A sends connect request to B
- B accepts, increments connect_seq, then has a socket failure
before telling A
- A reconnects, stil with connect_seq == 0
- B sees connect_seq == 0 and thinks there was a reset
This warrants a closer look in the fs client <-> mds case, but for now,
in the cluster-internal communications, it is moot, since reset
detection is unnecessary.
In the monitor case: we do need to check with resets because the peers
reuse the same entity_addr_t's (nonce==0), which means that a daemon
restart is effectively a reset. In that case, use a different policy
that continues to check for resets.
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
We currently prefer up osds, and then pull sequentially from peer_info
(strays we know about at the time). This adds an additional preference
for the current acting, which means we can avoid changes to acting when
they are largely useless.
In particular, I observed that we chose [5,3] and later (when recovery
completed) chose [5,1] because we had since heard about an eligible stray
on 1. That switch was basically a waste...
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Samuel Just <sam.just@inktank.com>
This properly destroys objects. In the process, remove usage_exit();
also kill error-handling in set_conf_param (never relevant for rbd.cc,
and if you call it with both pointers NULL, well...)
Also switch to EXIT_FAILURE for consistency.
Signed-off-by: Dan Mick <dan.mick@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
Fixes: #2948
We are using a hash_map<> to map tids to Op*'s. In handle_osd_map(),
we will recalc_op_target() on each Op in a random (hash) order. These
will get put in a temp map<tid,Op*> to ensure they are resent in the
correct order, but their order on the session->ops list will be random.
Then later, if we reset an OSD connection, we will resend everything for
that session in ops order, which is be incorrect.
Fix this by explicitly reordering the requests to resend in
kick_requests(), much like we do in handle_osd_map(). This lets us
continue to use a hash_map<>, which is faster for reasonable numbers of
requests. A simpler but slower fix would be to just use map<> instead.
This is one of many bugs contributing to #2947.
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Samuel Just <sam.just@inktank.com>