mirror of
https://github.com/ceph/ceph
synced 2025-02-03 17:03:51 +00:00
d6cf77dcbb
We take little consideration about the type of the bucket we are adding an item to. Although this works for the vast majority of cases, it was also leaving room for silly little mistakes to become problematic and leading a monitor to crash. For instance, say that we ran: 'ceph osd crush set 0 osd.0 1 root=foo row=foo' If root 'foo' exists, then this will work and 'row=foo' will be ignored. However, if there is no bucket named 'foo', then we would (in order) create a bucket for row 'foo', adding osd.0 to it, and would then add osd.0 to bucket 'foo' again -- remember, little consideration regarding the bucket type was given. This would trigger a monitor crash due to the recursion done in 'adjust_item_weight'. A solution to this problem is to make sure that we do not allow specifying multiple buckets with the same name when adding an item to crush. Not only solves our crash problem, but will also render invalid any mistake when specifying the wrong bucket type (say, using 'row=bar' when in fact 'bar' is a rack). Fixes: #3515 Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com> |
||
---|---|---|
.. | ||
builder.c | ||
builder.h | ||
crush.c | ||
crush.h | ||
CrushCompiler.cc | ||
CrushCompiler.h | ||
CrushTester.cc | ||
CrushTester.h | ||
CrushWrapper.cc | ||
CrushWrapper.h | ||
CrushWrapper.i | ||
grammar.h | ||
hash.c | ||
hash.h | ||
mapper.c | ||
mapper.h | ||
old_sample.txt | ||
sample.txt | ||
types.h |