osd/osd_types: add blocked_by to pg_stat_t

Signed-off-by: Sage Weil <sage@redhat.com>
Add handles for the ceph-mon starting with upstart
osd/PG: populate pg_stats_t blocked_by

Keep a PG member for OSDs that current block us, and fill it into the
stats struct when we publish.  Use a vector<int> in pg_stats_t to limit the
overhead (memory, decoding) on this list once it is static.

Signed-off-by: Sage Weil <sage@redhat.com>
mon/OSDMonitor: clean up 'osd perf' command placement

This doesn't need an OSDMap; move it out of that block.

Signed-off-by: Sage Weil <sage@redhat.com>
mon/PGMap: s/osdid/osd/ in 'osd perf' plaintext heading

Signed-off-by: Sage Weil <sage@redhat.com>
Update doc

File 'sysvinit' is necessary to allow the start of mon at each reboot.
Signed-off-by: François Lafont <francois.lafont@crdp.ac-versailles.fr>
mon/OSDMonitor : Use user provided ruleset for replicated pool

When creating a replicated pool, currently ceph ignore the ruleset
name provided by user but use a global default ruleset.

This patch fix this bug, so the rulset specified by
ceph osd pool create replicated
can be properly set.

Signed-off-by: Xiaoxi Chen <xiaoxi.chen@intel.com>
osd/PG: set blocked_by during peering GetInfo

Signed-off-by: Sage Weil <sage@redhat.com>
osd/PG: set blocked_by during peering GetLog

Signed-off-by: Sage Weil <sage@redhat.com>
osd/PG: set blocked_by in Incomplete state

Signed-off-by: Sage Weil <sage@redhat.com>
osd/PG: set blocked_by in GetMissing

Signed-off-by: Sage Weil <sage@redhat.com>
mon/PGMap: track histogram of pg blocked_by

Signed-off-by: Sage Weil <sage@redhat.com>
mon: add 'osd blocked-by' command

Print a histogram of how many peers are blocked by each OSD.  This is
useful for quickly diagnosing which OSDs are broken or slow and preventing
peering from completing.

In the future, we can populate the pg_stat_t with peer OSDs for more than
just peering waits, but this is a useful start.

Signed-off-by: Sage Weil <sage@redhat.com>
qa/workunits/cephtool: add simple 'ceph osd perf' test

Signed-off-by: Sage Weil <sage@redhat.com>
qa/workunits/cephtool: add trivial 'ceph osd blocked-by' test

Signed-off-by: Sage Weil <sage@redhat.com>
osd/PG: bound number of blocked_by OSDs we report per PG

We don't want to include an unbounded-sized vector of OSDs in the pg_stat_t
struct.  Cap it, and report a random subset of the actual blockers to fit
within the limit.

Signed-off-by: Sage Weil <sage@redhat.com>
osd/osd_types: s/int/int32_t/ in pg_stat_t

Signed-off-by: Sage Weil <sage@redhat.com>
ceph-disk: fix verify_no_in_use check

We only need to verify that partitions aren't in use when we want to
consume the whole device (osd data), not when we want to create an
additional partition for ourselves (osd journal).

Backport: firefly
Signed-off-by: Sage Weil <sage@redhat.com>
Revert "Fix for bug #6700"

This reverts commit 673394702b725ff3f26d13b54d909208daa56d89.

This appears to break things when the journal and data disk are *not* the same.
And I can't seem to reproduce the original failure...

Signed-off-by: Sage Weil <sage@redhat.com>
ceph-disk: fix log syntax error

  File "/usr/sbin/ceph-disk", line 303, in command_check_call
    LOG.info('Running command: %s' % ' '.join(arguments))
TypeError: sequence item 2: expected string, NoneType found

Backport: firefly
Signed-off-by: Sage Weil <sage@redhat.com>