crush/mapper: generalize descend_once

The legacy behavior is to make the normal number of tries for the
recursive chooseleaf call.  The descend_once tunable changed this to
making a single try and bail if we get a reject (note that it is
impossible to collide in the recursive case).

The new set_chooseleaf_tries lets you select the number of recursive
chooseleaf attempts for indep mode, or default to 1.  Use the same
behavior for firstn, except default to total_tries when the legacy
tunables are set (for compatibility).  This makes the rule step
override the (new) default of 1 recursive attempt, keeping behavior
consistent with indep mode.

Signed-off-by: Sage Weil <sage@inktank.com>
crush/CrushWrapper: minor cleanup on tunables helpers

Signed-off-by: Sage Weil <sage@inktank.com>
crushtool: reorg test-map-* cli tests

Signed-off-by: Sage Weil <sage@inktank.com>
crush: add set_choose_local_[fallback_]tries steps

This alls all of the tunables to be overridden by a specific rule.

Signed-off-by: Sage Weil <sage@inktank.com>
mon: warn if crush has non-optimal tunables

Allow warning to be disabled via ceph.conf.  Link to the docs from the
warning detail.  Add a section to the docs specifically about what to do
about the warning.

Signed-off-by: Sage Weil <sage@inktank.com>
crush: expand info about tunables that we dump

Include the tunables profile, and flags indicating whether it is optimal,
legacy, or requires certain features.

Signed-off-by: Sage Weil <sage@inktank.com>
mon/OSDMonitor: 'osd crush show-tunables'

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

crush: make set_chooseleaf_tries work with firstn chooseleaf, too

Reviewed-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Loic Dachary <loic@dachary.com>