ceph: fix mon.*

Signed-off-by: Sage Weil <sage@inktank.com>
upstart: start ceph-all on runlevel [2345]

Starting when only one network interface has started breaks machines with
multiple nics in very problematic ways.

There may be an earlier trigger that we can use for cases where other
services on the local machine depend on ceph, but for now this is better
than the existing behavior.

See #5248

Signed-off-by: Sage Weil <sage@inktank.com>
mon: OSDMonitor: don't ignore apply_incremental()'s return on UfP [1]

apply_incremental() may return -EINVAL.  Don't ignore it.

[1] UfP = Update from Paxos

Fixes: #5343

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
ceph-disk: work around buggy rhel/centos parted

parted on RHEL/Centos prefixes the *machine readable output* with

 1b 5b 3f 31 30 33 34 68

Note that the same thing happens when you 'import readline' in python.

Work around it!

Signed-off-by: Sage Weil <sage@inktank.com>
ceph: flush stderr, stdout for sane output; add prefix

Aie.

e.g., ceph tell mon.* injectargs '--debug-ms 1'

 mon.a: injectargs:debug_ms=1/1
 mon.b: injectargs:debug_ms=1/1
 mon.c: injectargs:debug_ms=1/1

or

 osd.0: debug_ms=1/1
 osd.1: debug_ms=1/1
 osd.2: Problem getting command descriptions from ('osd', '2'), ENXIO
 osd.3: Problem getting command descriptions from ('osd', '3'), ENXIO
 osd.4: Problem getting command descriptions from ('osd', '4'), ENXIO
 osd.5: Problem getting command descriptions from ('osd', '5'), ENXIO

Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Dan Mick <dan.mick@inktank.com>
ceph.spec: add missing ceph_test_rados_api_cmd to package

Signed-off-by: Sage Weil <sage@inktank.com>
ceph.spec: include by-partuuid udev workaround rules

These are need for old or buggy udev.  Having them for new and unbroken
udev is harmless.

Signed-off-by: Sage Weil <sage@inktank.com>
ceph-disk: do not use mount --move (or --bind)

The kernel does not let you mount --move when the parent mount is
shared (see, e.g., https://bugzilla.redhat.com/show_bug.cgi?id=917008
for another person this also confused).  We can't use --bind either
since that (on RHEL at least) screws up /etc/mtab so that the final
result looks like

 /var/lib/ceph/tmp/mnt.HNHoXU /var/lib/ceph/osd/ceph-0 none rw,bind 0 0

Instead, mount the original dev in the final location and then umount
from the old location.

Signed-off-by: Sage Weil <sage@inktank.com>
ceph-disk-udev: activate-journal

Trigger 'ceph-disk activate-journal' from the alt udev rules.

Signed-off-by: Sage Weil <sage@inktank.com>
udev: drop useless --mount argument to ceph-disk

It doesn't mean anything anymore; drop it.

Signed-off-by: Sage Weil <sage@inktank.com>
rules:  Don't disable tcmalloc on ARM (and other non-intel)

Fixes #5342

Signed-off-by: Gary Lowell  <gary.lowell@inktank.com>
ceph.in: zero-arg invocation was broken (check array length)

Also remove stray comment char

Signed-off-by: Dan Mick <dan.mick@inktank.com>
ceph: add newline when using old monitors

The old tool would print a newline after outs, e.g. from 'ceph osd create'.
Do the same when we are talking to old monitors.  Also, put outs at the
top, not the bottom!

Tweak the json code to not add the newline again if we already did so
above.

Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Dan Mick <dan.mick@inktank.com>
ceph: pass --format=foo to old monitors

And --threshold too, although.. really.

Signed-off-by: Sage Weil <sage@inktank.com>
Reviwed-by: Dan Mick <dan.mick@inktank.com>
Merge remote-tracking branch 'gh/next'