Track information about laggy probabilities for each OSD. That is, the
probability that if it is marked down it is because it is laggy, and
the expected interval over which it will take to recovery if it is laggy.
We store this in the OSDMap because it is not convenient to keep it
elsewhere in the monitor. Yet. When the new mon infrastructure is in
place, there is a bunch of stuff that can be moved out of the OSDMap
'extended' section into other mon data structures.
Signed-off-by: Sage Weil <sage@inktank.com>
Allow thread pool sizes to be adjusted on the fly by telling the
ThreadPool which config option to monitor. Add some basic unit tests
for resizing.
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Samuel Just <sam.just@inktank.com>
radosgw-admin bucket check [--fix] --bucket=<bucket>
The command will dump the existing bucket header stats,
and the calculated bucket header stats. If --fix is provided
the bucket stats will be overwritten by the recalculated
stats.
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
We now pass the object version returned by obj_stat. We use that
epoch for setting the object version through the index suggestion
mechanism. This was broken by a recent change that switched from
reading the obj stats by (wrongly) calling directly to ioctx->stat()
to calling get_obj_state().
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
An update shouldn't be skipped if epoch is zero. We'd see a zero
epoch if we tried to read an object and it didn't exist. That
could happen e.g., when a delete object operation failed to
call the complete earlier, and now we're recalling delete on
the (now non-existent object).
However, note that the zero epoch is racy. We may end up racing
with an object creation. This will be taken care of by a new
rados change that will set the returned object version even if
it didn't exist.
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
We weren't setting the 'exists' flag on the bucket entry,
so we ended up not updating the index correctly.
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
Fixes: #3127
Bad variable scoping made it so that specific variables
weren't initialized between suggested changes iterations.
This specifically affected a case where in a specific
change we had an updated followed by a remove, and the
remove was on a non-existent key (e.g., was already
removed earlier). We ended up re-substracting the
object stats, as the entry wasn't reset between
the iterations (and we didn't read it because the
key didn't exist).
backport:argonaut
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
Otherwise importing into another pool when the default pool, rbd,
doesn't exist results in an error trying to open the rbd pool.
Reported-by: Sébastien Han <han.sebastien@gmail.com>
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
If the configure osd journal size is > the block device size, warn, but
do not generate an error and abort startup. This makes it safe to have
a default 'osd journal size' value of, say, 1 GB without fear of breaking
existing clusters with smaller jouranl block devices.
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Tommi Virtanen <tv@inktank.com>