Project

General

Profile

Actions

Bug #62588

open

ceph config set allows WHO to be osd.*, which is misleading

Added by Dan van der Ster 8 months ago. Updated 13 days ago.

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

0%

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

Description

We came across a customer cluster who uses `ceph config set osd.* ...` thinking it would apply to all OSDs.
In fact this applies to zero osds, because there is no OSD named literally `osd.*`
Config set should better filter for WHO daemons that can exist, e.g. osd.<int>, mds.<string>

# ceph config set osd.* osd_max_backfills 3
# ceph config dump
WHO        MASK  LEVEL     OPTION                                 VALUE       RO
...
# ceph config dump
WHO        MASK  LEVEL     OPTION                                 VALUE       RO
...
  osd            advanced  osd_max_backfills                      10
  osd            advanced  osd_recovery_sleep_hdd                 0.000000
    osd.*        advanced  osd_max_backfills                      3
  mds            basic     mds_cache_memory_limit                 2147483648

Files

Actions #1

Updated by Dan van der Ster 8 months ago

  • Category set to Administration/Usability
Actions #2

Updated by Radoslaw Zarzynski 8 months ago

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

Updated by Radoslaw Zarzynski 8 months ago

This is an ideal task for a beginner / hackathon.

Actions #4

Updated by Laura Flores 8 months ago

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

Updated by Laura Flores 8 months ago

Thanks Radek! I'll bring it to the Grace Hopper Open Source Day!

Actions #6

Updated by Laura Flores 8 months ago

Steps to reproduce:

1. Build a vstart cluster on the main branch
2. Run a `config set` command on an osd with an invalid id, for example:

$ ./bin/ceph config set osd.* osd_max_backfills 3
*** DEVELOPER MODE: setting PATH, PYTHONPATH and LD_LIBRARY_PATH ***
2023-08-28T18:32:38.928+0000 7f57f7391700 -1 WARNING: all dangerous and experimental features are enabled.

2023-08-28T18:32:38.937+0000 7f57f7391700 -1 WARNING: all dangerous and experimental features are enabled.

3. Run `./bin/ceph config dump`:
$ ./bin/ceph config dump
*** DEVELOPER MODE: setting PATH, PYTHONPATH and LD_LIBRARY_PATH ***
2023-08-28T18:32:50.729+0000 7f301d4a4700 -1 WARNING: all dangerous and experimental features are enabled.

2023-08-28T18:32:50.736+0000 7f301d4a4700 -1 WARNING: all dangerous and experimental features are enabled.

WHO     MASK  LEVEL     OPTION                            VALUE        RO
...
osd.*         advanced  osd_max_backfills                 3              
osd.0         basic     osd_mclock_max_capacity_iops_ssd  7983.955103    
osd.1         basic     osd_mclock_max_capacity_iops_ssd  8466.901217    
osd.2         basic     osd_mclock_max_capacity_iops_ssd  9146.109883    
...

Actual results:

Notice the entry for `osd.*`, which doesn't exist.

Would be good to test if the same applies to other symbols, or even numbers of non-existent OSDs (i.e. osd.4)

Expected results:

An appropriate error message should come up when the user issues `ceph config set` to indicate that they used an invalid symbol or a non-existent osd id. Also, the invalid entry should not be added to the `ceph config dump` output.

Actions #7

Updated by Laura Flores 8 months ago

  • Backport set to reef,quincy

Verified that this also occurs on reef/quincy.

Actions #8

Updated by Dan van der Ster 8 months ago

@Laura thanks!

One comment. We shouldn't prevent creating config options for daemons that do not exist -- e.g. we may want to set a config option before deploying a daemon, so that it gets the config its first time running.

What we should do here IMHO is have a regex of acceptable daemon ids/names.

Actions #9

Updated by Laura Flores 8 months ago

Dan van der Ster wrote:

@Laura thanks!

One comment. We shouldn't prevent creating config options for daemons that do not exist -- e.g. we may want to set a config option before deploying a daemon, so that it gets the config its first time running.

What we should do here IMHO is have a regex of acceptable daemon ids/names.

Ah, got it. So setting a config option for osd.4 is fine if it doesn't exist yet, but setting a config for osd.$ is never acceptable, and shouldn't be added to `config dump`. In case 2 is the desired result also an error message?

Actions #10

Updated by Suyash Dongre 14 days ago · Edited

Would be good to test if the same applies to other symbols, or even numbers of non-existent OSDs (i.e. osd.4)

Can confirm, the config set command would work for non-existing osd(s) (osd.4) as well as for other symbols ($, #, ^)

Would try to create a fix for this.

suyash@suyash-Vivo-Ubuntu:~/ceph/build$ sudo ./bin/ceph config dump
*** DEVELOPER MODE: setting PATH, PYTHONPATH and LD_LIBRARY_PATH ***
2024-04-16T22:45:04.989+0530 7b33c2d1c640 -1 WARNING: all dangerous and experimental features are enabled.
2024-04-16T22:45:05.061+0530 7b33c2d1c640 -1 WARNING: all dangerous and experimental features are enabled.
WHO     MASK  LEVEL     OPTION                            VALUE        RO
global        advanced  osd_pool_default_min_size         1              
global        advanced  osd_pool_default_size             3              
mon           advanced  mon_allow_pool_delete             true           
mon           advanced  mon_allow_pool_size_one           true           
mon           advanced  mon_data_avail_crit               1              
mon           advanced  mon_data_avail_warn               2              
mon           advanced  mon_osd_reporter_subtree_level    osd            
mgr           advanced  mgr/dashboard/x/ssl_server_port   41247        * 
mgr           advanced  mgr/prometheus/x/server_port      9283           
mgr           advanced  mgr/restful/x/server_port         42247        * 
osd           advanced  osd_copyfrom_max_chunk            524288         
osd           dev       osd_debug_misdirected_ops         true           
osd           dev       osd_debug_op_order                true           
osd           advanced  osd_scrub_load_threshold          2000.000000    
osd.#         advanced  osd_max_backfills                 3              
osd.$         advanced  osd_max_backfills                 3              
osd.*         advanced  osd_max_backfills                 3              
osd.0         basic     osd_mclock_max_capacity_iops_ssd  2151.954446    
osd.1         basic     osd_mclock_max_capacity_iops_ssd  2099.170771    
osd.2         basic     osd_mclock_max_capacity_iops_ssd  2169.316098    
osd.4         advanced  osd_max_backfills                 3              
osd.^         advanced  osd_max_backfills                 3              
mds           dev       mds_debug_auth_pins               true           
mds           dev       mds_debug_frag                    true           
mds           dev       mds_debug_subtrees                true 
Actions #11

Updated by Suyash Dongre 13 days ago · Edited

I created a pull request for this: https://github.com/ceph/ceph/pull/56971

A warning message is now generated if user enters invalid daemon name

Actions

Also available in: Atom PDF