tests: flush logs before grepping them

Otherwise the test races with the daemon writing the logs and can
sometime fail.

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
mon: add the get_crush_ruleset helper

By factoring a code snippet from prepare_pool_crush_ruleset with no
modification.

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
mon: pool create must not always create a ruleset

The implicit creation of a ruleset when creating a pool is convenient
when nothing is specified. However, if the caller sets a ruleset name,
it should not implicitly create it but return ENOENT instead. Silently
creating a ruleset when there is a typo in the ruleset name is
confusing.

http://tracker.ceph.com/issues/9304 Fixes: #9304

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
Merge pull request #2506 from dachary/wip-9304-unintended-implicit-ruleset

erasure-code: pool create must not always create a ruleset

Reviewed-by: João Eduardo Luís <joao@redhat.com>
mds: typedefs for rank and gid in MDSMap

Make it clearer what these numbers are where they appear.

Signed-off-by: John Spray <john.spray@redhat.com>
messages: fix constness in MCommand constructor

Signed-off-by: John Spray <john.spray@redhat.com>
common: fix cmd_getval constness

...so that one can pass in a const cmdmap.

Signed-off-by: John Spray <john.spray@redhat.com>
mds: generalize handle_command for MCommand

Still need to handle authorization, adapt existing
clog-ing commands to set outbuf, and implement
get_command_descriptions.

Signed-off-by: John Spray <john.spray@redhat.com>
mds: handle JSON MCommands

Signed-off-by: John Spray <john.spray@redhat.com>
mds: introduce MDS auth caps

Initially very simple, to distinguish normal filesystem
clients from those that can do destructive things
with "tell mds".

Signed-off-by: John Spray <john.spray@redhat.com>
osdc/Objecter: don't consume non-osd cmd replies

...so that Client can get command replies from MDSs.

Signed-off-by: John Spray <john.spray@redhat.com>
client: add mds_command operation

akin to Objecter::osd_command

Signed-off-by: John Spray <john.spray@redhat.com>
libcephfs: add ceph_mds_command

Wraps the equivalent fn in Client.

Signed-off-by: John Spray <john.spray@redhat.com>
pybind/rados: add conf/conf_defaults attributes

Store these from initialization so that given a Rados
object, we can read back config to initialize a
LibCephFS object.

Signed-off-by: John Spray <john.spray@redhat.com>
pybind/cephfs: implement mds_command

Signed-off-by: John Spray <john.spray@redhat.com>
pybind/cephfs: implement conf_parse_argv

So that when using `ceph` we can pass through
--debug-x args etc.

Signed-off-by: John Spray <john.spray@redhat.com>
pybind/ceph_argparse: implement 'tell mds'

Still need to properly implement _parse_mds_id

Signed-off-by: John Spray <john.spray@redhat.com>
test/pybind: tests for MDS spec parsing

Signed-off-by: John Spray <john.spray@redhat.com>
fixup client mark_down
msg: allow calling dtor immediately after ctor

Asserting on reaper_stop only made sense if the
messenger had ever been started: as it stood,
one couldn't create and destroy a messenger
without also starting and stopping it.

Signed-off-by: John Spray <john.spray@redhat.com>