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/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>
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)
OSDMonitor: fix quorum_features comparison in check_cluster_features

We need to see if there's a feature which is not in the quorum_features,
not if there are no features in common!

Signed-off-by: Greg Farnum <greg@inktank.com>
mon: check changes to the whole CRUSH map and to tunables against cluster features

When we change the tunables, or set a new CRUSH map, we need to make sure it's
supported by all the monitors and OSDs currently participating in the cluster.

Fixes: #8738

Signed-off-by: Greg Farnum <greg@inktank.com>
Merge pull request #2072 from ceph/wip-8738-next

Patch up the CRUSH map compatibility guards

Reviewed-by: Loic Dachary <loic@dachary.org>
Reviewed-by: Joao Eduardo Luis <joao.luis@inktank.com>
Reviewed-by: Sage Weil <sage@redhat.com>
Merge remote-tracking branch 'gh/next'