mon/Paxos: fix off-by-one in last_ vs first_committed check

peon last_committed + 1 == leader first_committed is okay.  Note that the
other check (where I clean up whitespace) gets this correct.

Fixes: #9301 (partly)
Signed-off-by: Sage Weil <sage@redhat.com>
mon: re-bootstrap if we get probed by a mon that is way ahead

During bootstrap we verify that our paxos commits overlap with the other
mons we will form a quorum with.  If they do not, we do a sync.

However, it is possible we pass those checks, then fail to join a quorum
before the quorum moves ahead in time such that we no longer overlap.
Currently nothing kicks up back into a probing state to discover we need
to sync... we will just keep trying to call or join an election instead.

Fix this by jumping back to bootstrap if we get a probe that is ahead of
us.  Only do this from non probe or sync states as these will be common;
it is only the active and electing states that matter (and probably just
electing!).

Fixes: #9301
Backport: giant, firefly
Signed-off-by: Sage Weil <sage@redhat.com>
documentation: fix bugous osd stop/start example

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
documentation: tiering typo

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
rbd: Use a rolling average to compute RBD write throughput

Replace the cumulative average with a rolling average
to better expose variations within IOS/sec and bytes/sec.

Fixes: #9374
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
Merge remote-tracking branch 'gh/wip-9301'

Reviewed-by: Joao Eduardo Luis <joao.luis@inktank.com>
Merge pull request #2532 from dachary/wip-doc-tiering

documentation: tiering typo
Merge pull request #2529 from dachary/wip-doc-troubleshooting

documentation: fix bugous osd stop/start example
Crush: Changed Crush mapper temporary buffer length

Crush temporary buffers are allocated as per replica size configured
by the user.When there are more final osds (to be selected as per
rule) than the replicas, buffer overlaps and it causes crash. Hence
temporary buffer is allocated to max_size parameter that specifies
the maximum osds that can be selected using the rule.

Fixes: #9492

Signed-off-by: Johnu George <johnugeo@cisco.com>