librados, rados.py: add conf_parse_argv_remainder()

New parsing function to extract any known arguments from a vector
and return any unknowns; useful for ceph CLI to allow librados
first dibs on arguments so it doesn't have to reproduce the
argument recognition

Signed-off-by: Dan Mick <dan.mick@inktank.com>
ceph: remove global declarations, declare verbose and cluster near top

Signed-off-by: Dan Mick <dan.mick@inktank.com>
cmdparse.cc: remove redundant std:: prefixes

Signed-off-by: Dan Mick <dan.mick@inktank.com>
cmdparse: give up on templated cmd_getval()

gcc can select the wrong template instantiation sometimes (was selecting
the string version for maxmds, which is int64_t...???)  Avoid the
issue by duplicating rather than templating

Signed-off-by: Dan Mick <dan.mick@inktank.com>
ceph: use conf_parse_argv to deal with nonspecial Ceph args

This means parsing argv only once now, so pass arg lists to
new_style_command().  A little cleanup/commenting too.

Signed-off-by: Dan Mick <dan.mick@inktank.com>
cephtool/test.sh: fix "expect failure"

Signed-off-by: Dan Mick <dan.mick@inktank.com>
librados/rados.py: fix conf_parse_argv (don't overrun return array)

Also make sure to null out any non-existent return args

Signed-off-by: Dan Mick <dan.mick@inktank.com>
PGMonitor: fix pg dump and dump_stuck

dump needed to default to format plain, not json
dump_stuck was not doing format = plain correctly (coredumping)

Signed-off-by: Dan Mick <dan.mick@inktank.com>
ceph: various cleanups
 - make base class valid() do useful work
 - remove valid from CephPoolname; pool need not exist for create
 - add --user as alias for --id
 - remove vestige of special --keyring handing
 - be sure childargs is an empty list rather than None
 - remove -- from childargs if present (to stop interpreting -- args)
 - handle connection timeout cleanly

Signed-off-by: Dan Mick <dan.mick@inktank.com>