test: test_store_tool: add 'crc <prefix> <key>' command

Returns the CRC of contents for a given key with a given prefix.

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
test: test_store_tool: optionally output value crc when listing keys

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
ceph_test_store_tool: add 'set prefix key' feature

Allow reading from a file.  See --help for more info.

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
mon/PGMap.cc: don't output header for pg dump_stuck if nothing stuck

Formatted output is already correct (no header)

Fixes: #4577
Signed-off-by: Dan Mick <dan.mick@inktank.com>
Merge pull request #680 from dmick/next

mon/PGMap.cc: don't output header for pg dump_stuck if nothing stuck

Reviewed-by: Sage Weil <sage@inktank.com>
Merge pull request #677 from ceph/wip-store-tool

wip-store-tool: Few patches to ceph_test_store_tool

Reviewed-by: Sage Weil <sage@inktank.com>
mon: MonmapMonitor: make 'ceph mon add' idempotent

MonMap changes lead to bootstraps.  Callbacks waiting for a proposal to
finish can have several fates, depending on what happens: finished, rerun
or aborted.

In the case of a bootstrap right after a monmap change, callbacks are
rerun.  Considering we queued the message that lead to the monmap change
on this queue, if we instead of finishing it end up reruning it, we will
end up trying to perform the same modification twice -- the last one will
try to modify an already existing state and we will return just that:
whatever you're attempting to do has already been done.

This patch makes 'ceph mon add' completely idempotent.  If one tries to
add an already existing monitor (i.e., same name, same ip:port), one
simply gets a 'monitor foo added', with return 0, no matter how many
times one runs the command.

Fixes: #5896

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
mon: Monitor: assert on absense of connection during dispatch

We expect to always have a connection associated with a message.
If that happens to not be so, assert.

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
mon: Monitor: drop client msg if no session exists and msg is not MAuth

If we are not a monitor and we don't have a session yet, we must first
authenticate with the cluster.  Therefore, the first message to the
monitor must be an MAuth.  If not, we assume it's a stray message and
just drop it.

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
mon: Monitor: dissociate msg handling from session & connection logic

Makes for simpler logic for patches to come.

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
mon: Monitor: only handle paxos msgs from a mon && if session has exec caps

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
mon: Monitor: reuse 'src_is_mon' bool on dispatch

Instead of making the same comparison twice with no gain at all.

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
Merge pull request #653 from ceph/wip-mon-auth

mon: Monitor: dissociate msg handling from session and connection logic

Reviewed-by: Sage Weil <sage@inktank.com>
qa: fix rbd cli tests checking size

b43bc1a0b0692818d789f9f489b9aba5dd40522f changed the kilo prefix
from K to k in a few places.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
Merge pull request #686 from ceph/wip-rbd-cli-tests

qa: fix rbd cli tests checking size

Reviewed-by: Sage Weil <sage@inktank.com>
PendingReleaseNotes: make a note about K vs k

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

mon: MonmapMonitor: make 'ceph mon add' idempotent

Reviewed-by: Sage Weil <sage@inktank.com>
PendingReleaseNotes: fix typo

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
Merge remote-tracking branch 'gh/next'

Conflicts:
	src/Makefile.am
Merge git://github.com/ceph/ceph