rbd: allow importing from stdin

This patch allows importing images from stdin with the following command:

   rbd import --size=<size in MB> - [dest-image]

v1 -> v2: stat stdin as well

Signed-off-by: Christian Brunner <chb@muc.de>
Merge branch 'master' of ssh://github.com/ceph/ceph
vstart.sh: initialize keyring even if not using cephx

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
osd: Adding const to methods in OSDMap

Signed-off-by: Adam Crume <adamcrume@gmail.com>
Signed-off-by: Sage Weil <sage@inktank.com>
doc: Added preliminary rbd and ko info.


Signed-off-by: John Wilkins <john.wilkins@inktank.com>
Merge remote-tracking branch 'gh/wip-mon-doc'
qa: stress_watch.sh workunit runs test_stress_watch

Signed-off-by: Sage Weil <sage@inktank.com>
test_stress_watch: exercise watch/unwatch/close from second client

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
Objecter: tone down linger op messages on tick

Signed-off-by: Samuel Just <sam.just@inktank.com>
Merge remote-tracking branch 'origin/wip-2491'
mon: throttle client msgr memory

Limit the amount of memory that can be consumed by client messages, similar
to the OSD.  Do not limit inter-mon messages.

Fixes: #2495
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
doc: fix autobuild debian source line

Signed-off-by: Sage Weil <sage@inktank.com>
test/: Added object map benchmarking tool

omap_bench writes configurable objectmaps to a configurable number
of objects and generates latency statistics.

Signed-off-by: Eleanor Cawthon <eleanor.cawthon@inktank.com>
Makefile: include ceph-mds upstart bits in dist tarball

Signed-off-by: Sage Weil <sage@inktank.com>
mon: fix slurp latest race

It is possible for the latest version to get out in front of the
last_committed version:

 a- start slurping
 a- slurp a bunch of states, through X
 a- get them back, write them out
 b- monitor commits many new states
 a- slurp latest, X+100 say, but only get some of those states due to the
    slurp per-message byte limit
 a- write latest + some (but not all) prior states
 a- call back into slurp(), update_from_paxos(), trigger assert

This fix ensures that we make note of the source's new latest, so that on
the next pass through slurp() we will grab any missing states.

We *also* explicitly require that we get everything up through what we have
stashed, in defense against some future kludging that might only require we
nearly (but not completely) in sync before finishing the slurp.

Fixes: #2379
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
Merge remote-tracking branch 'gh/wip-admin'
objecter: fix pgls

First problem: if the osd returns more entries than we ask for, max_entries
was going negative, and we were requesting (u64)(-small number) on the
next iteration, slamming the OSD when the PG was big.  We fix that by
finishing response_size >= max_entries.

Second problem: AFAICS we were not requesting the second chunk on a large
PG at all, here, if the OSD returned less than what we wanted.  Fix this
by asking for more in that case.

That means we detect the end of a PG in two ways:

 * if the OSD sets the return value to 1 (instead of 0)
 * if we get 0 items in the response

Another patch will change the OSD behavior to return 1, and all will be
well.  If we run against an old OSD, we'll send an extra request for each
PG and get nothing back before we realize we've hit the end and move on.

Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Sam Just <sam.just@inktank.com>
ReplicatedPG: fix pgls listing, add max listing size

Previously, a client requesting a large pgls could tie up the
osd for an unacceptable amount of time.  Also, it's possible
for the osd to return less than the requested number of
entries anyway, so we now return 1 when we have completed the
listing.

Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
omapbench: fix misc warnings

Signed-off-by: Sage Weil <sage@inktank.com>
omapbench: fix warning

Signed-off-by: Sage Weil <sage@inktank.com>