mon: Remove global version code introduced around bobtail's release

This patch reverts most of the global version (gv) related patches that
were introduced around bobtail's release as a prelude to the single-paxos
patches.

The gv infrastructure allowed us to gather version information on the
monitors, essential to the move to a single-paxos implementation on
existing clusters -- this means that for an existing cluster to upgrade
to the a single-paxos monitor, it will first have to be upgraded to a
version prior to this patch.  This patch strips the monitor subsystem of
all the gv-related code that is of no use for upcoming versions.

Furthermore, from this patch onwards until all single-paxos patches
are merged, ceph-mon won't work as expected, and may not compile at some
point in the git history.

These patches are not retro-compatible, and the monitors are not expected
to work with earlier versions.

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
auth: cephx: KeyServer: add 'has_secrets()' function

We need this in the AuthMonitor to assess if we should encode a full version
of the KeyServer and submit it to the Paxos along with the incrementals.

Not performing such a check will lead us to an erroneous version, from which
we won't be able to recover.

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
mon: restrict pool size to 1..10

See: #4159
Signed-off-by: Sage Weil <sage@inktank.com>
Merge remote-tracking branch 'gh/wip-4159'
qa: mon/pool_ops.sh: fix pool tests

The '! command' doesn't fail properly, even with -e, in bash (wtf!).

Also, the last pool deletion command succeeds because the pool
'--yes-i-really-really-mean-it' doesn't exist.  So drop that test.

Signed-off-by: Sage Weil <sage@inktank.com>
qa: mon/pool_ops.sh: test pool set size

Signed-off-by: Sage Weil <sage@inktank.com>
osd: introduce HASHPSPOOL pool flag, feature to avoid overlapping pg placements

The existing code will overlay the placement of PGs from pools because
it simply adds the ps to the pool as the CRUSH input.  That means that
the layout/placement for pg 0.10 == 1.9 == 2.8 == 3.7 == 4.6 == ...,
which is not optimal.

Instead, use hash(ps, poolid).  The avoids the initial problem of
the sequence being adjacent to other pools.  It also avoids the (small)
possibility that hash(poolid) will drop us somewhere in the output
number space where our sequence of outputs overlaps with some other
pool; instead, out output sequence will be a fully random (for a well-
behaved hash).

Use the multi-input hash functions used by CRUSH for this.

Default to the legacy behavior for now.  We won't enable this until
deployed systems and kernel code catch up.

Fixes: #4128
Signed-off-by: Sage Weil <sage@inktank.com>
mon: move OSDMap feature bit calculation into an OSDMap method

Signed-off-by: Sage Weil <sage@inktank.com>
osd/OSDMap: note OSDHASHPSPOOL feature when pool FLAG_HASHPSPOOL is set

This allows the osd and mon to enforce feature bits on their connections.

Signed-off-by: Sage Weil <sage@inktank.com>
Merge branch 'wip-pool'

Reviewed-by: Samuel Just <sam.just@inktank.com>
man: make the cephfs man page marginally more truthful

Signed-off-by: Greg Farnum <greg@inktank.com>
doc: make the cephfs man page marginally more truthful

Put it in the right place this time.

Signed-off-by: Greg Farnum <greg@inktank.com>
qa: mon/pool_ops.sh: fix last test

Got this one backwards, bah!

Signed-off-by: Sage Weil <sage@inktank.com>
mon: fix new pool type

I broke this in 8cc2b0f1243b2717af1de329a7fa6a8b5350db68.

Signed-off-by: Sage Weil <sage@inktank.com>
mon: MonitorDBStore: Add a key/value store to be used in the monitor

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
mon: Monitor: keyring always on mon_data/keyring by default

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
mon: allow syslog level and facility for cluster log to be controlled

Allow user to control the minimum level to go to syslog for the client-
and server-side submission paths for the cluster log, along with the syslog
'facility'.  See syslog(3) man page.

Also move the level checks into a LogEntry method.

Closes: #3704
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Joao Luis <joao.luis@inktank.com>
osd: remove force hack for testing the HASHPSPOOL code

Also from 8cc2b0f1243b2717af1de329a7fa6a8b5350db68.

Signed-off-by: Sage Weil <sage@inktank.com>
Timer.cc: use complete() rather than finish()

Signed-off-by: Samuel Just <sam.just@inktank.com>
ReplicatedPG: add intrusive_ptr hooks

Signed-off-by: Samuel Just <sam.just@inktank.com>