Project

General

Profile

Actions

Bug #16813

open

"radosgw --show-config" and "radosgw-admin --show-config" do not display current configuration accurately

Added by James Saint-Rossy over 7 years ago. Updated over 7 years ago.

Status:
New
Priority:
Low
Assignee:
-
Target version:
-
% Done:

0%

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

Description

These switches seem to show a mixture of the current configuration and the default configuration depending on the setting:

[root@pistorergw2-cc38-h01 ceph]# grep frontends /etc/ceph/ceph.conf
rgw frontends = civetweb port=8080 num_threads=50
[root@pistorergw2-cc38-h01 ceph]# radosgw-admin --show-config | grep frontends
rgw_frontends = fastcgi, civetweb port=7480
[root@pistorergw2-cc38-h01 ceph]# radosgw --show-config | grep frontends
rgw_frontends = fastcgi, civetweb port=7480
[root@pistorergw2-cc38-h01 ceph]# netstat -nat | egrep '0.0.0.0:7480|0.0.0.0:8080'
tcp        0      0 0.0.0.0:8080            0.0.0.0:*               LISTEN

This command displays the current configuration accurately

[root@pistorergw2-cc38-h01 ceph]# ceph --admin-daemon /var/run/ceph/`ls -Art ceph-client.* | tail -n 1` config show | grep frontends
    "rgw_frontends": "civetweb port=8080 num_threads=50",

I'd like to recommend that the --show-config switch be removed from radosgw/radosgw-admin since they are redundant anyway.

Actions #1

Updated by Yan Jun over 7 years ago

Hi, We can get the accurate configuration by specifying rgw instance name (eg. -n client.rgw.us-east-1). since we may configure multiple instances in the conf file.

[root@tana75 ~]# radosgw-admin --show-config |grep frontends                        
rgw_frontends = fastcgi, civetweb port=7480
[root@tana75 ~]# 
[root@tana75 ~]# radosgw-admin --show-config -n client.rgw.us-east-1 |grep frontends
rgw_frontends = civetweb port=7480
[root@tana75 ~]# radosgw-admin --show-config -n client.rgw.us-east-2 |grep frontends 
rgw_frontends = civetweb port=81
Actions #2

Updated by James Saint-Rossy over 7 years ago

Hi Yan,

OK that works, but I don't see it documented anywhere. Can the `--show-config` be added to the `radosgw-admin` help as well as a note that the instance name should be specified. Also does a bare `--show-config` have any purpose or should the `-n` be required?

Actions #3

Updated by Yan Jun over 7 years ago

Hi James,

Actually, `--show-config` is a globally option that display the default code-level configurations and the `[global]` section in conf file. It's not just for `radosgw-admin`, other ceph cli commands (eg. ceph,ceph-mon,ceph-osd...) could also use it, maybe we sould document it. The only thing is how did you know this option since you haven't seen it documented anywhere.

Actions

Also available in: Atom PDF