doc: dev: cache-pool.rst: fix typo s/objets/objects/

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
osd: improve tests for configuration updates

Extract the default values from the actual configuration instead of
having them hardcoded. Also check that lowering the osd_map_cache_size
triggers the expected warning.

Signed-off-by: Loic Dachary <loic@dachary.org>
osd: allow osd map cache size to be adjusted at runtime

Signed-off-by: Sage Weil <sage@inktank.com>
OSD: await_reserved_maps() prior to calling mark_down

send_message_osd_cluster() et al are *trying* to protect their Connection
lookups (and not re-open zapped Connections) via map reservations, but
that only works if we know that we haven't already called mark_down() on
the entities they might be looking up. So we need to await_reserved_maps
before we do any mark_down calls.
Since the waiting might take some time (fast dispatch in progress), only do
so if we are actually going to mark somebody down.

Fixes: #8512

Signed-off-by: Greg Farnum <greg@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
OSD: wake_pg_waiters after dropping pg lock

Otherwise, we dispatch_session_waiting while still holding the pg lock,
which is obviously wrong.  Unfortunately, this places an additional
burden on any user of _create_lock_pg, but I think it's unavoidable
since that method must atomically add the pg to the map and lock it.

Fixes: #8961
Introduced in:
  25466839589813047c975e44e67e14f34e32139e
  ecda2fef8ce982df3581a3b47ba74ae581d82479
Signed-off-by: Samuel Just <sam.just@inktank.com>
common/AsyncReserver: add dump()

Signed-off-by: Sage Weil <sage@inktank.com>
osd: add dump_reservations asok command

Allow an admin to inspect pending and in-progress reservations.

Backport: firefly
Signed-off-by: Sage Weil <sage@inktank.com>
qa/workunits/rest/test.py: make osd create test idempotent

Avoid possibility that we create multiple OSDs do to retries by passing in
the optional uuid arg.  (A stray osd id will make the osd tell tests a
few lines down fail.)

Fixes: #8728
Signed-off-by: Sage Weil <sage@inktank.com>
OpTracker: use mark_event rather than _mark_event

mark_event() interfaced changed to accept time and it is default
to 'now'. The mark_event is the wrapper function of _mark_event()
and it has the check for optracking enabled/disabled as well.
The _mark_event() is now a private function.

Signed-off-by: Somnath Roy <somnath.roy@sandisk.com>
OpTracker: The optracker enabled/disabled check is added

The optracker enabled/disabled check is now added in the
mark_event(const string&) interface.

Signed-off-by: Somnath Roy <somnath.roy@sandisk.com>
ReplicatedPG: Removed the redundant register_snapset_context call

In the get_object_context(), the get_snapset_context is been called
and the register_snapset_context is already been invoked from there.
This call seems to be redundant.

Signed-off-by: Somnath Roy <somnath.roy@sandisk.com>
mon: OSDMonitor: 'osd pool' - if we can set it, we must be able to get it

Add support to get the values for the following variables:
 - target_max_objects
 - target_max_bytes
 - cache_target_dirty_ratio
 - cache_target_full_ratio
 - cache_min_flush_age
 - cache_min_evict_age

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
OSD: adjust share_map() to handle the case that the osd is down

The assert was hitting while OSd is waiting for becoming healthy
in handle_osd_map(). This can happen while io is going on and
OSDs are made down forcefully by say osd thrash command.
So, the fix could be instead of asserting just return from here.

Fixes: #8646

Signed-off-by: Somnath Roy <somnath.roy@sandisk.com>
[werror] Fix c++11-compat-reserved-user-defined-literal

c++11 readiness, avoid clash with
http://www.stroustrup.com/C++11FAQ.html#UD-literals

Signed-off-by: Thorsten Behrens <tbehrens@suse.com>
ceph_argparse_flag has no regular 3rd parameter.

With clang warning: 'va_start' has undefined behavior with reference
types, noticing copy-paste mistake on ceph_argparse_flag.

Signed-off-by: Thorsten Behrens <tbehrens@suse.com>
Automagically setup submodules on first run.

I mean, who's reading the README, anyway?

Signed-off-by: Thorsten Behrens <tbehrens@suse.com>
Merge pull request #2046 from ceph/wip-8670

mon: OSDMonitor: 'osd pool' - if we can set it, we must be able to get it

Reviewed-by: Loic Dachary <loic@dachary.org>
Reviewed-by: Sage Weil <sage@redhat.com>
Merge pull request #2061 from ceph/wip-8728

qa/workunits/rest/test.py: make osd create test idempotent

Reviewed-by: Dan Mick <dan.mick@inktank.com>
qa: support running under non privileged user

If the test is run against a cluster started with vstart.sh (which is
the case for make check), the --asok-does-not-need-root disables the use
of sudo and allows the test to run without requiring privileged user
permissions.

Signed-off-by: Loic Dachary <loic@dachary.org>
(cherry picked from commit 522174b066044e51a7019bd6cad81117e83c394e)
Merge pull request #2068 from thorstenb/wip-janitorial-clang-4

ceph_argparse_flag has no regular 3rd parameter.

Reviewed-by: Loic Dachary <loic@dachary.org>