]> git-server-git.apps.pok.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>
Thu, 12 Oct 2023 05:23:57 +0000 (10:53 +0530)
commit7f1d13d2abd6590ec98f566d28c4810558227ac8
treef69a75d2a445648ea9422a20f8a292e25a58435e
parent129959fe9d0ef9f0a81dc3637356e2bd1f39bfe8
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>
(cherry picked from commit 3821722e5660437298a7c0f41e1061d363090103)
src/mon/ConfigMap.cc
src/mon/ConfigMap.h
src/mon/ConfigMonitor.cc