]> 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>
Mon, 9 Oct 2023 05:25:16 +0000 (10:55 +0530)
commitea83e2f746702aea9df65e8cf3937e2fb7e6f1f1
tree32197157eca2ae1189f32f5908409894ec830544
parentb2903cb0842b1846a00474d4d51d49d1dc33bce1
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