From: Jan Fajerski Date: Wed, 8 Nov 2017 09:30:09 +0000 (+0100) Subject: tools/crushtool: skip device id if no name exists X-Git-Tag: v13.0.1~173^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F18901%2Fhead;p=ceph.git tools/crushtool: skip device id if no name exists When an OSD with an id < max_id is removed, i.e. the osd ids are not continuous, crushtool decompile prints bogus info. Skip any device ids without a name. Signed-off-by: Jan Fajerski --- diff --git a/src/crush/CrushCompiler.cc b/src/crush/CrushCompiler.cc index 8825f7543c0..6ac892a15be 100644 --- a/src/crush/CrushCompiler.cc +++ b/src/crush/CrushCompiler.cc @@ -314,10 +314,12 @@ int CrushCompiler::decompile(ostream &out) out << "\n# devices\n"; for (int i=0; i