Project

General

Profile

Extend crush rule language » History » Version 1

Jessica Mack, 06/08/2015 11:42 PM

1 1 Jessica Mack
h1. Extend crush rule language
2
3
h3. Summary
4
5
Extend the CRUSH mapping language to support more complicated placement strategies.
6
7
h3. Owners
8
9
* Sage Weil (Inktank)
10
* ???
11
12
h3. Interested Parties
13
14
* Josh Durgin
15
* Dan Mick
16
* Xiaoxi Chen
17
* Zhiteng Huang
18
* Loic Dachary
19
* Christophe Courtaut christophe.courtaut@gmail.com
20
* Xiaobing Zhou(xzhou40 (AT) hawk.iit.edu)
21
22
h3. Current Status
23
24
The current mapping language is very simple: TAKE, CHOOSE[LEAF], EMIT.  It works for the most common placement strategies only.
25
26
h3. Detailed Description
27
28
A few limitations:
29
 - The current choose iterates over the 'working set' and recursively selects new items for each item.  It always applies to all items in the working set.  That precludes strategies like "pick 2 racks, choose N from the first, and M from the second".
30
 - It is assumed the hierarchy is a single uniform tree.  You cannot have two parallel trees of devices (say, SSDs and HDDs) in the same nodes, and pick 1 ssd and 1 hdd but ensure that they exist in different hosts.
31
 
32
Use cases currently not covered by the existing implementation:
33
- choose 2 racks.  choose N replicas from first rack, M replicas from second rack.
34
- each host contains two types of devices.  choose 2 hosts, and choose type A from first host and type B from second host.
35
- give the number of replicas priority over the available buckets, e.g.: if the replication size is N and the rule says put them in different rooms (or racks, ...), but there are only M<N rooms (or racks, ...), create none the less N replicas and distribute them using all of the M rooms (let some rooms (or racks, ...) have more than one replica)
36
- Use addressing (or other?) rules (e.g. IPv4 subnet) to automatically group replicas and choose N replicas from first group, M replicas from second group, etc.  May be close to the first use case listed above.
37
- ??? (please add to this list!)
38
 
39
h3. Work items