Project

General

Profile

Actions

Bug #45253

open

Inconsistent characters allowed set for device classes

Added by Frank Schilder about 4 years ago. Updated 8 months ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
% Done:

0%

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

Description

I changed the device class of a number of disks yesterday successfully to "rbd.meta":

[root@gnosis ~]# ceph osd crush tree | grep rbd.meta
  37 rbd.meta    0.36400                 osd.37             
  48 rbd.meta    0.36400                 osd.48             
  36 rbd.meta    0.36400                 osd.36             
...

I was also able to set a device-class filter rule for configs:

[root@gnosis ~]# ceph config dump
...
  osd       class:rbd.meta basic    osd_memory_target                 4294967296
...

However, a "ceph osd crush class ls-osd rbd.meta" fails with an invalid character error:

[root@gnosis ~]# ceph osd crush class ls-osd rbd.meta
Invalid command: invalid chars . in rbd.meta
osd crush class ls-osd <class> :  list all osds belonging to the specific <class>
Error EINVAL: invalid command

I think "." sounds like a reasonable character to allow.

  1. Please fix this to be consistent throughout all device-class commands.
  2. For being able to continue to work: should I change the character or is "." legal? This question is urgent, I would like to keep the dot and am stuck right now.
Actions #1

Updated by Frank Schilder about 4 years ago

Version is mimic 13.2.8. Sorry, forgot.

Actions #2

Updated by Greg Farnum almost 4 years ago

  • Project changed from Ceph to RADOS
Actions #3

Updated by Neha Ojha almost 4 years ago

  • Tags set to low-hanging-fruit
Actions #4

Updated by Laura Flores almost 2 years ago

  • Translation missing: en.field_tag_list set to low-hanging-fruit
Actions #5

Updated by Laura Flores 8 months ago

Steps to reproduce in a vstart cluster:

1. Check the current crush tree:

$ ./bin/ceph osd crush tree
ID  CLASS  WEIGHT   TYPE NAME       
-1         0.29576  root default    
-3         0.29576      host folio01
 0    ssd  0.09859          osd.0   
 1    ssd  0.09859          osd.1   
 2    ssd  0.09859          osd.2   

2. Remove the default device class for one of the OSDs (in this case, osd.0):

$ ./bin/ceph osd crush rm-device-class 0
done removing class of osd(s): 0

3. Give it a new device class, as seen in the example pasted on this tracker:

$ ./bin/ceph osd crush set-device-class rbd.meta osd.0
set osd(s) 0 to class 'rbd.meta'

4. Check the new crush tree:

$ ./bin/ceph osd crush tree
ID  CLASS     WEIGHT   TYPE NAME       
-1            0.29576  root default    
-3            0.29576      host folio01
 0  rbd.meta  0.09859          osd.0   
 1       ssd  0.09859          osd.1   
 2       ssd  0.09859          osd.2   

5. Reproduce the bug with:

$ ./bin/ceph osd crush class ls-osd rbd.meta
Invalid command: invalid chars . in rbd.meta
osd crush class ls-osd <class> :  list all osds belonging to the specific <class>
Error EINVAL: invalid command

Actions #6

Updated by Laura Flores 8 months ago

Claiming this issue for the time being for Grace Hopper Open Source Day.

Actions

Also available in: Atom PDF