]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
crush/CrushTester: add check_name_maps() method
authorKefu Chai <kchai@redhat.com>
Tue, 26 May 2015 04:08:09 +0000 (12:08 +0800)
committerKefu Chai <kchai@redhat.com>
Fri, 10 Jul 2015 07:40:00 +0000 (15:40 +0800)
commit960ea49699f421ceb89c9e0c9430378a35f09a9a
treec81f28c0b6030953687afd40bc15461a52c2cac9
parent3b6977b706dbc99cac25bec1b71a628c398c6ff1
crush/CrushTester: add check_name_maps() method

* check for dangling bucket name or type names referenced by the
  buckets/items in the crush map.
* also check for the references from Item(0, 0, 0) which does not
  necessarily exist in the crush map under testing. the rationale
  behind this is: the "ceph osd tree" will also print stray OSDs
  whose id is greater or equal to 0. so it would be useful to
  check if the crush map offers the type name indexed by "0"
  (the name of OSDs is always "OSD.{id}", so we don't need to
  look up the name of an OSD item in the crushmap).

Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit b75384d73958faf81d45847a7dfa56f4fa347e6f)
src/crush/CrushTester.cc
src/crush/CrushTester.h