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>
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>
test: use 0U with gtest to avoid spurious warnings

Signed-off-by: Loic Dachary <loic@dachary.org>
Merge pull request #2052 from dachary/wip-vstart-wrapped

qa: support running under non privileged user

Reviewed-by: Florent Flament <florent.flament@cloudwatt.com>
Merge pull request #2053 from dachary/wip-signed-warnings

test: use 0U with gtest to avoid spurious warnings

Reviewed-by: Sahid Orentino Ferdjaoui <sahid.ferdjaoui@cloudwatt.com>
qa: Update data pool ID for vxattrs test

Signed-off-by: John Spray <john.spray@redhat.com>
mon: Set crash_replay_interval automatically

Signed-off-by: John Spray <john.spray@redhat.com>
qa: add a check for crash_replay_interval autoset

... that after a fs new on fresh pools, crash_replay_interval
is set to the default on the data pool.

Signed-off-by: John Spray <john.spray@redhat.com>
mon/MDSMonitor: EC check in 'fs new' like newfs

Signed-off-by: John Spray <john.spray@redhat.com>
qa: update cephtool EC pools test to respect IDs

...of data and metadata pools which are no longer
constant.

Signed-off-by: John Spray <john.spray@redhat.com>
mds: Update default FS name

From 'default' to 'cephfs' so that it looks
at least vaguely meaningful.

Signed-off-by: John Spray <john.spray@redhat.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>
Merge pull request #2054 from ceph/wip-fs-cmds-oops

Apply some accidentally-dropped commits from the wip-fs-cmds branch to be a little friendlier and pass tests.

Reviewed-by: Greg Farnum <greg@inktank.com>
mon: clear osd request queue latency info on down or up

It doesn't make sense to warn about slow requests on OSDs that are down;
clear those stats in the monitor when we see an OSD go down (or up).

Fixes: #8692
Signed-off-by: Sage Weil <sage@inktank.com>
Merge pull request #2055 from ceph/wip-8692

mon: clear osd request queue latency info on down or up

Reviewed-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>
mds: add thread to encode/submit log events

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
mds: use mutex to protect log segment list

prevent race between creating new log segment and trimming old
segment.

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
mds: defer encoding/submitting log events to separate thread

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>