osdc/Objecter: add perfcounters for commands

This matches the other counters we maintain for other kinds of ops.

Signed-off-by: Sage Weil <sage@inktank.com>
osdc/Objecter: kick command ops on osd con resets

Resend osd/pg commands on the OSDSession, just as we do with other request
types.

Signed-off-by: Sage Weil <sage@inktank.com>
ceph.in: argparsing cleanup: suppress --completion, add help

Options -v, --verbose, --concise didn't have helpstrings
Option --completion doesn't quite work yet, and should be hidden anyway

Signed-off-by: Dan Mick <dan.mick@inktank.com>
ceph.in: refuse 'ceph <type> tell' commands; suggest 'ceph tell <type>'

Signed-off-by: Dan Mick <dan.mick@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
osdc/Objecter: ping osds for which we have pending commands

As with ops and linger_ops, this ensures we detect connection resets.

Signed-off-by: Sage Weil <sage@inktank.com>
osdc/Objecter: dump command ops

Dump command_ops along with everything else.

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

Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
librados: wait for osdmap for commands that need it

In commit 7e1cf87b5158c870e2a118ed6d316be8cb9818ce we stopped waiting for
the osdmap on start because the Objecter will normally wait, but for some
commands we assume the osdmap is recent(ish).

Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
librados: add missing #include

librados/librados.cc: In function 'int rados_mon_command_target(void*, const char*, const char**, size_t, const char*, size_t, char**, size_t*, char**, size_t*)':
error: librados/librados.cc:1877: 'LONG_MAX' was not declared in this scope
error: librados/librados.cc:1877: 'LONG_MIN' was not declared in this scope

Signed-off-by: Sage Weil <sage@inktank.com>
ceph-disk: add 'zap' command

Signed-off-by: Sage Weil <sage@inktank.com>
ceph-disk: call partprobe outside of the prepare lock; drop udevadm settle

After we change the final partition type, sgdisk may or may not trigger a
udev event, depending on how well udev is behaving (it varies between
distros, it seems).  The old code would often settle and wait for udev to
activate the device, and then partprobe would uselessly fail because it
was already mounted.

Call partprobe only at the very end, after prepare is done.  This ensures
that if partprobe calls udevadm settle (which is sometimes does) we do not
get stuck.

Drop the udevadm settle.  I'm not sure what this accomplishes; take it out,
at least until we determine we need it.

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

Activate an osd via its journal device.  udev populates its symlinks and
triggers events in an order that is not related to whether the device is
an osd data partition or a journal.  That means that triggering
'ceph-disk activate' can happen before the journal (or journal symlink)
is present and then fail.

Similarly, it may be that they are on different disks that are hotplugged
with the journal second.

This can be wired up to the journal partition type to ensure that osds are
started when the journal appears second.

Include the udev rules to trigger this.

Signed-off-by: Sage Weil <sage@inktank.com>
ceph-fuse: fix uninitialized variable

There is a delete call in the out_mc_start_failed path.

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

ceph-disk: udev/partprobe redo, zap command, activate-journal command
Merge remote-tracking branch 'gh/next'