execute_ctx is the only path which actually has a client op,
let's clarify eval_repop by moving that logic inline there.
This also eliminates most of the repop->ctx users from
eval_repop.
Signed-off-by: Samuel Just <sjust@redhat.com>
This way, we don't expose the RepGather structure
up into the users (which pretty much exclusively
use the repop->ctx member anyway). This will pave
the way to removing RepGather::ctx.
Part of this involves generalizing the repop callback
members (queue_snap_trimmer and on_applied) to
on_applied, on_committed, on_success, and on_finish
on both OpContext and RepGather.
Signed-off-by: Samuel Just <sjust@redhat.com>
initialize MirrorImage::state to a certain value, otherwise the
generated test instances would be undetermined, and hence fail
the dencoder tests.
Signed-off-by: Kefu Chai <kchai@redhat.com>
the destructor of Scrub::Store asserts that `this->results` should
always be empty when it is free'd. before this change, if we are
repairing, the results is not flushed or cleaned up, this crashes
osd daemon when a new PG internval comes. also we should not keep
the results around even we don't want to populate them to the omap
if we are repairing, it's just a waste.
Signed-off-by: Kefu Chai <kchai@redhat.com>
For the mon, using ps aux to find the process will only show part of the
command line and the $RUNID may be missing. For the OSD, the $RUNID is
passed using an environment variable and will not show at all.
There is no need to test both ceph-osd and ceph-mon since they both end
up in the same code path, pidfile_write. Add a log line that only shows
when the --pid-file is empty and grep for it in the simplest possible
way.
The TEST_pidfile test failed to kill a process because there was
no pidfile with its pid. This is fixed by backuping the pidfile before
it is modified.
http://tracker.ceph.com/issues/14834Fixes: #14834
Signed-off-by: Loic Dachary <loic@dachary.org>
to list inconsistent snapsets of a given PG, this command exposes
get_inconsistent_snapsets() rados API to user.
Fixes: #13505
Signed-off-by: Kefu Chai <kchai@redhat.com>
to list inconsistent objects of a given PG, this command exposes
get_inconsistent_objects() rados API to user.
Signed-off-by: Kefu Chai <kchai@redhat.com>
the inconsistent snapsets are identified in ReplicatedPG::_scrub()
after we compared the authorized objects with their replica/shards.
these inconsistent information are stored in the omap of objects
with prefix "SCRUB_SS_".
Signed-off-by: Kefu Chai <kchai@redhat.com>
persist inconsistent objects found when comparing the ScrubMaps
collected from replica/shards. the discrepancies between the auth
copy and the replica are identified as inconsistencies. and hence
encoded into the omap of an object of the temp coll of the PG in
question.
scrub_types.{h,cpp} are introduced to hide the details of how we
persist the scrub types from the librados client.
Signed-off-by: Kefu Chai <kchai@redhat.com>
to list inconsistent PGs of a given pool. this command exposes
the underlying get_inconsistent_pgs() API to user.
Signed-off-by: Kefu Chai <kchai@redhat.com>
These will track whether local images should be mirrored, and map them
to a unique global id. There's a state field for safely disabling
mirroring while operating on multiple objects.
Fixes: #14419
Signed-off-by: Josh Durgin <jdurgin@redhat.com>
We'll use this object only for mirroring-related purposes, not generic
settings on a pool.
Refs: #14419
Signed-off-by: Josh Durgin <jdurgin@redhat.com>