Bug #20446
closedmon does not let you create crush rules using device classes
0%
Description
i run ceph 12.1.0 version ,and try crush class function,and find a problem with the name
step:
1.ceph osd crush class create ssd
2.ceph osd crush set-device-class osd.0 ssd
3.ceph osd tree:
ID WEIGHT TYPE NAME UP/DOWN REWEIGHT PRIMARY-AFFINITY
-4 1.00000 root default~ssd
-3 1.00000 host lab8106~ssd
0 1.00000 osd.0 up 1.00000 1.00000
the bucket name with a "~"
4.i try to create a rule with the name of the root :
ceph osd crush rule create-simple ssd default~ssd host firstn
then out put:
" Invalid command: invalid chars ~ in default~hdd"
i see the code in src/mon/MonCommands.h with :
"""
COMMAND("osd crush rule create-simple " \
"name=name,type=CephString,goodchars=[A-Za-z0-9-_.] " \
"name=root,type=CephString,goodchars=[A-Za-z0-9-_.] " \
"name=type,type=CephString,goodchars=[A-Za-z0-9-_.] " \
"""
so
it will change the goodchars to =[A-Za-z0-9-_~.] or change the create bucket without "~"
some one will fix it?
Updated by Chang Liu almost 7 years ago
I tested in my env, It does exist in master branch. seems that it's easy to fix this problem. I will create a PR.
Updated by Kefu Chai almost 7 years ago
- Status changed from New to Fix Under Review
Updated by Sage Weil almost 7 years ago
- Subject changed from RADOS:osd crush class function problem to mon does not let you create crush rules using device classes
- Priority changed from High to Urgent
Updated by Sage Weil almost 7 years ago
- Status changed from Fix Under Review to Resolved