Crush will spew non-deterministic badness if it walks off the end of
the osd_weight vector.
Signed-off-by: Sage Weil <sage@newdream.net>
cerr << me << ": error reading crush map from " << import_crush << std::endl;
exit(1);
}
+
// validate
CrushWrapper cw;
bufferlist::iterator p = cbl.begin();
cw.decode(p);
+
+ if (cw.get_max_devices() > osdmap.get_max_osd()) {
+ cerr << me << ": crushmap max_devices " << cw.get_max_devices()
+ << " > osdmap max_osd " << osdmap.get_max_osd() << std::endl;
+ exit(1);
+ }
// apply
OSDMap::Incremental inc;