Bug #62588
openceph config set allows WHO to be osd.*, which is misleading
0%
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
Updated by Dan van der Ster 9 months ago
- Category set to Administration/Usability
Updated by Radoslaw Zarzynski 9 months ago
This is an ideal task for a beginner / hackathon.
Updated by Laura Flores 9 months ago
- Translation missing: en.field_tag_list set to low-hanging-fruit
Updated by Laura Flores 9 months ago
Thanks Radek! I'll bring it to the Grace Hopper Open Source Day!
Updated by Laura Flores 9 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.
Updated by Laura Flores 9 months ago
- Backport set to reef,quincy
Verified that this also occurs on reef/quincy.
Updated by Dan van der Ster 9 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.
Updated by Laura Flores 9 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?
Updated by Suyash Dongre about 1 month 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
Updated by Suyash Dongre about 1 month ago · Edited
- File Screenshot from 2024-04-17 17-20-04.png Screenshot from 2024-04-17 17-20-04.png added
- Assignee set to Suyash Dongre
- Pull request ID set to 56971
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