Subtask #7146
closedFeature #4929: Erasure encoded placement group
implement osd crush rule create-erasure
100%
Description
Currently, what we need to do is make sure the EC plugin maps onto a
linear array of devices the same way that CRUSH does. For a pyramid code,
the CRUSH rule will be something like
step take root
step choose 3 rack
step choose 5 osd
emit
to get 3 groups of 5 devices as an array of size 15. That means the EC
plugin needs to map onto ranks that go something like
0-3 data
4 local parity
5-8 data
9 local parity
10-11 data
12-13 global parity
14 local parity
(or whatever).
Getting this to line up is a bit fragile, unfortunately. We could make
a plugin method that describes the subgrouping, but even then I'm not
sure how easy it is to programmatically validate that an arbitrary CRUSH
rule will behave well. Maybe it is enough to
- have some way to query the layout of the EC plugin (e.g, 3 groups of 5).
- add a new 'osd crush rule create-pyramid ...' command to supplement
'create-simple'.
and document it well...