]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
mon/ConfigMonitor: Show localized name in "config dump --format json" output
authorSridhar Seshasayee <sseshasa@redhat.com>
Wed, 9 Aug 2023 12:52:29 +0000 (18:22 +0530)
committerSridhar Seshasayee <sseshasa@redhat.com>
Tue, 19 Sep 2023 11:29:25 +0000 (16:59 +0530)
commit3821722e5660437298a7c0f41e1061d363090103
tree6bfa2534947e40fedfc9db7d110e8bed60929e16
parent080bb4ffba888b37b1803842cfdee9149ca83074
mon/ConfigMonitor: Show localized name in "config dump --format json" output

The "ceph config dump" command without the json formatted output shows
the localized option names and their values. An example of a normalized
vs localized option is shown below:

Normalized: mgr/dashboard/ssl_server_port (maintaned within Option struct)
Localized: mgr/dashboard/x/ssl_server_port (maintained in mon store)

But the "ceph config dump --format json*" output showed the normalized
option names which was not consistent with the "config dump" output.
The output of the command along with variations for pretty printing must
show the same content.

This commit introduces a new member within the ConfigMap's MaskedOption
struct called "localized_name". This is initialized to the localized name
as part of ConfigMonitor::load_config() method.

The MaskedOption::dump() used for the json formatting is modified to
display the localized_name instead of the normalized name.

Fixes: https://tracker.ceph.com/issues/62379
Signed-off-by: Sridhar Seshasayee <sseshasa@redhat.com>
src/mon/ConfigMap.cc
src/mon/ConfigMap.h
src/mon/ConfigMonitor.cc