Project

General

Profile

Bug #20446

mon does not let you create crush rules using device classes

Added by peng zhang almost 7 years ago. Updated over 6 years ago.

Status:
Resolved
Priority:
Urgent
Assignee:
-
Category:
-
Target version:
-
% Done:

0%

Source:
Tags:
Backport:
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Component(RADOS):
Monitor
Pull request ID:
Crash signature (v1):
Crash signature (v2):

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?

History

#1 Updated by Chang Liu almost 7 years ago

I will try to verify it.

#2 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.

#4 Updated by Kefu Chai almost 7 years ago

  • Assignee deleted (Kefu Chai)

#5 Updated by Kefu Chai almost 7 years ago

  • Status changed from New to Fix Under Review

#6 Updated by Sage Weil over 6 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

#7 Updated by Sage Weil over 6 years ago

  • Status changed from Fix Under Review to Resolved

Also available in: Atom PDF