Bug #9675
closed
splitting a pool doesn't start when rule_id != ruleset_id
Added by Dan van der Ster over 9 years ago.
Updated about 9 years ago.
Backport:
dumpling,firefly,giant
Description
78e84f34da83abf5a62ae97bb84ab70774b164a6
Dumpling 0.67.10
Rule is like this:
{ "rule_id": 6,
"rule_name": "castor",
"ruleset": 7,
"type": 1,
"min_size": 1,
"max_size": 10,
"steps": [
{ "op": "take",
"item": -21},
{ "op": "chooseleaf_firstn",
"num": 0,
"type": "host"},
{ "op": "emit"}]}]
Then:
ceph osd pool create testsplit 64
- default ruleset is 0
ceph osd pool set testsplit pg_num 65
- new pg is created correctly
ceph osd pool set testsplit crush_ruleset 7
- pgs are moved correctly to the other root
ceph osd pool set testsplit pg_num 66
- new pg is not created
ceph osd pool set testsplit crush_ruleset 0
- 65 pgs moved to default root, 66th pg still not created.
ceph osd pool set testsplit pg_num 67
- 66th and 67th pgs are created.
Sorry for formatting... should be like this:
ceph osd pool create testsplit 64
# default ruleset is 0
ceph osd pool set testsplit pg_num 65
# new pg is created correctly
ceph osd pool set testsplit crush_ruleset 7
# pgs are moved correctly to the other root
ceph osd pool set testsplit pg_num 66
# new pg is not created
ceph osd pool set testsplit crush_ruleset 0
# 65 pgs moved to default root, 66th pg still not created.
ceph osd pool set testsplit pg_num 67
# 66th and 67th pgs are created.
Workaround was to insert a dummy 6th ruleset to make ruleset_id=rule_id=7 for the castor pool. Then pg splitting worked as expected.
- Assignee set to Joao Eduardo Luis
- Priority changed from Normal to High
See also the ceph-user thread "NO pg created for erasure-coded pool" where rule_id != ruleset on firefly.
- Status changed from New to In Progress
- Status changed from In Progress to Pending Backport
pending backports awaiting review/merge on
Note that this patch will not change existing crushmaps, it will just make new rules using matching ruleset_id == rule_id. I guess there also is a need to fix whatever fails because it uses rule_id instead of ruleset_id for existing crushmap.
- Description updated (diff)
970a797 CrushWrapper: pick a ruleset same as rule_id (in giant), b9450b5 CrushWrapper: pick a ruleset same as rule_id (in firefly), 309c74d CrushWrapper: pick a ruleset same as rule_id (in dumpling),
- Status changed from Pending Backport to Resolved
Also available in: Atom
PDF