On Tue, Nov 07, 2017 at 07:41:53PM +0000, Sage Weil wrote:
On Tue, 7 Nov 2017, Jan Fajerski wrote:
Hi,
I noticed some weird behaviour of crushtool when decompiling a map after an
osd has been removed. Say I have a cluster with 4 osds. When I remove osd.2,
get and decompile the crushmap, I get this device list in the crushmap:
# devices
device 0 osd.0 class hdd
device 1 osd.1 class hdd
device 2 device2
device 3 osd.3 class hdd
I'd appreciate some info on whether this is intended behaviour and what the
reasoning is. I'd expect the map not to list id 2 at all and afaict the
crushmap doesn't contain the id anymore. If there is no reason for listing
that I'd be happy to make a PR.
There's no good rason to print it. It comes from
out << "\n# devices\n";
for (int i=0; i<crush.get_max_devices(); i++) {
out << "device " << i << " ";
print_item_name(out, i, crush);
print_item_class(out, i, crush);
out << "\n";
}
There isn't a convenient way at this point to know whether the device is
used in the hierarchy, so exclusing it is a bit of a hassle. Happy to
take a PR doing so, though!
https://github.com/ceph/ceph/pull/18901
sage
--
Jan Fajerski
Engineer Enterprise Storage
SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton,
HRB 21284 (AG Nürnberg)
--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html