mon: do not forward other mon's requests to other mons

The request forwarding infrastructure is there for client requests.
However, we (ab)use it for mon's sending MLog messages: LogClient sends an
MLog message to itself, and that is either handled locally (if leader) or
forwarded to the leader.

If that races with an election, we were forwarding an MLog from another mon
to the leader.  This is not necessary; the original MLog sender will resend
the request on election_finish() to the latest leader.

The fix is to adjust forward_request_leader() to only forward messages from
a mon if that mon is itself.

This was reproduced while testing the fix for #4748.

Signed-off-by: Sage Weil <sage@inktank.com>
osd: Fix logic in OSDMap::containing_subtree_is_down()

Check for up OSDs as we walk up the crushmap hierarchy

fixes: #4822

Signed-off-by: David Zafman <david.zafman@inktank.com>
mon: fix double-forwarding check

The PaxosServiceMessage fields are no longer filled in.  Use Session::proxy_con
instead.

Signed-off-by: Sage Weil <sage@inktank.com>
mon: mark PaxosServiceMessage forward fields deprecated

These are no longer used; we manage forward state explicitly via the
Monitor sessions instead.  Mark them deprecated so we don't accidentally
rely on them.  Also, fix the annoying "mon.-1" garbage debug output that
is confusing.

Signed-off-by: Sage Weil <sage@inktank.com>
rgw: trivial cleanups post code review

Following code review of #4760.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
rgw: fix bucket count when stating account

We need to add up the num of buckets and not just set it
as we don't read the entire list of buckets in one operation.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
rgw: fix plain formatter flush

The plain formatter flush needs to append eol if needed, and
not to clear the sections stack.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
rgw: swift list containers can return 204

In order to keep compatibility with swift, if a plain formatter
is being used, we should return 204 when there are no containers.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
rgw: fix bucket listing when reaching limit

Bucket listing was broken when limit was set.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
rgw: fix list buckets limit

There was an issue when limit was being set, we didn't
break from the iterating loop if limit was reached. Also,
S3 does not enforce any limit, so keep that behavior.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
rgw: fix compilation for certain architectures

Casting.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
Merge branch 'wip-mon-fwd' into next

Reviewed-by: Greg Farnum <greg@inktank.com>
Merge branch 'wip-4760' into next
mon: use brute force to find a sync provider if our first one fails

We try and select a random monitor first, but if that fails we should
make sure that nobody's available before asserting.

Fixes #4812

Signed-off-by: Greg Farnum <greg@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
monitor: squash signed/unsigned comparison warning

This is a safe range to do comparisons against, and we compare
against the signed rank inside the loop.

Signed-off-by: Greg Farnum <greg@inktank.com>
Merge branch 'wip-4822' into next

Reviewed-by: Sam Just <sam.just@inktank.com>
doc: Added ceph-deploy quick start.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
doc: Added ceph-deploy preflight.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
doc: Added new quick start preamble and index.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
doc: Added ceph-deploy package management (install | uninstall ) section.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>