Skip to content

mon/ConfigMonitor: Show localized name in "config dump --format json" output - #52906

Merged
ljflores merged 2 commits into
ceph:mainfrom
sseshasa:wip-fix-config-dump-pretty-print
Sep 26, 2023
Merged

ljflores merged 2 commits into
ceph:mainfrom
sseshasa:wip-fix-config-dump-pretty-print

Conversation

@sseshasa

@sseshasa sseshasa commented Aug 9, 2023 •

Copy link
Copy Markdown
Contributor

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 [email protected]

Contribution Guidelines

Checklist

  • Tracker (select at least one)
    • References tracker ticket
    • Very recent bug; references commit where it was introduced
    • New feature (ticket optional)
    • Doc update (no ticket needed)
    • Code cleanup (no ticket needed)
  • Component impact
    • Affects Dashboard, opened tracker ticket
    • Affects Orchestrator, opened tracker ticket
    • No impact that needs to be tracked
  • Documentation (select at least one)
    • Updates relevant documentation
    • No doc update is appropriate
  • Tests (select at least one)
Show available Jenkins commands
  • jenkins retest this please
  • jenkins test classic perf
  • jenkins test crimson perf
  • jenkins test signed
  • jenkins test make check
  • jenkins test make check arm64
  • jenkins test submodules
  • jenkins test dashboard
  • jenkins test dashboard cephadm
  • jenkins test api
  • jenkins test docs
  • jenkins render docs
  • jenkins test ceph-volume all
  • jenkins test ceph-volume tox
  • jenkins test windows

@sseshasa
sseshasa requested a review from a team as a code owner August 9, 2023 14:21
@sseshasa

Copy link
Copy Markdown
Contributor Author

Test Results With Fix:

$ ./bin/ceph config dump | grep server_
mgr           advanced  mgr/dashboard/x/ssl_server_port   41728         * 
mgr           advanced  mgr/prometheus/x/server_port      9283            
mgr           advanced  mgr/restful/x/server_port         42728         *

$ ./bin/ceph config dump --format json | jq | grep -A 5 -B 3 server_
  },
  {
    "section": "mgr",
    "name": "mgr/dashboard/x/ssl_server_port",
    "value": "41728",
    "level": "advanced",
    "can_update_at_runtime": false,
    "mask": ""
  },
  {
    "section": "mgr",
    "name": "mgr/prometheus/x/server_port",
    "value": "9283",
    "level": "advanced",
    "can_update_at_runtime": true,
    "mask": ""
  },
  {
    "section": "mgr",
    "name": "mgr/restful/x/server_port",
    "value": "42728",
    "level": "advanced",
    "can_update_at_runtime": false,
    "mask": ""
  },

@sseshasa

Copy link
Copy Markdown
Contributor Author

@rzarzynski @neha-ojha PTAL when you can.

@rzarzynski rzarzynski left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving for main while being a bit nervous about fallouts / users relying on the buggy behavior. Might be worth a CDM.

@sseshasa

Copy link
Copy Markdown
Contributor Author

Approving for main while being a bit nervous about fallouts / users relying on the buggy behavior. Might be worth a CDM.

@rzarzynski I posted changes pertaining to this PR on the ceph-users mail list (https://www.spinics.net/lists/ceph-users/msg78499.html) and didn't get any response so far. Therefore, I think this change shouldn't cause a major fallout. We can also bring this up in other dev or community meetups to be sure.

@rzarzynski

Copy link
Copy Markdown
Contributor

@neha-ojha: points out we should document this in release notes.

@rzarzynski

Copy link
Copy Markdown
Contributor

@yuriw, @ljflores: ping.

@ljflores

Copy link
Copy Markdown
Member

It's in testing now @rzarzynski !

@sseshasa

Copy link
Copy Markdown
Contributor Author

@neha-ojha: points out we should document this in release notes.

@rzarzynski Sure, I will add to the release notes.

@sseshasa
sseshasa force-pushed the wip-fix-config-dump-pretty-print branch from f4baa09 to a86a0ab Compare August 29, 2023 04:32
@sseshasa

Copy link
Copy Markdown
Contributor Author

@neha-ojha: points out we should document this in release notes.

@rzarzynski Sure, I will add to the release notes.

@rzarzynski @neha-ojha Added the release note. Please verify.

@github-actions

github-actions Bot commented Sep 7, 2023

Copy link
Copy Markdown

This pull request can no longer be automatically merged: a rebase is needed and changes have to be manually resolved

… 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 <[email protected]>
@sseshasa
sseshasa force-pushed the wip-fix-config-dump-pretty-print branch from a86a0ab to 74aeab9 Compare September 19, 2023 11:33
@sseshasa

Copy link
Copy Markdown
Contributor Author

jenkins test api

Comment thread PendingReleaseNotes Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: shows now?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rzarzynski I modified the note to include bit more detail. PTAL.

@sseshasa
sseshasa force-pushed the wip-fix-config-dump-pretty-print branch from 74aeab9 to 401b30f Compare September 21, 2023 11:40
@sseshasa

Copy link
Copy Markdown
Contributor Author

jenkins test make check

@pdvian

pdvian commented Sep 25, 2023

Copy link
Copy Markdown
Contributor

https://pulpito.ceph.com/lflores-2023-09-06_18:19:12-rados-wip-yuri6-testing-2023-08-28-1308-distro-default-smithi/

Failures, unrelated:

  1. https://tracker.ceph.com/issues/59142
  2. https://tracker.ceph.com/issues/59196
  3. https://tracker.ceph.com/issues/55347
  4. https://tracker.ceph.com/issues/62084
  5. https://tracker.ceph.com/issues/62975 <<<---- New Tracker
  6. https://tracker.ceph.com/issues/62449
  7. https://tracker.ceph.com/issues/61774
  8. https://tracker.ceph.com/issues/53345

Details:

  1. mgr/dashboard: fix e2e for dashboard v3 - Ceph - Mgr - Dashboard
  2. ceph_test_lazy_omap_stats segfault while waiting for active+clean - Ceph - RADOS
  3. SELinux Denials during cephadm/workunits/test_cephadm
  4. task/test_nfs: AttributeError: 'TestNFS' object has no attribute 'run_ceph_cmd' - Ceph - CephFS
  5. site-packages/paramiko/channel.py: OSError: Socket is closed - Infrastructure
  6. test/cls_2pc_queue: TestCls2PCQueue.MultiProducer and TestCls2PCQueue.AsyncConsumer failure - Ceph - RGW
  7. centos 9 testing reveals rocksdb "Leak_StillReachable" memory leak in mons - Ceph - RADOS
  8. Test failure: test_daemon_restart (tasks.cephadm_cases.test_cli.TestCephadmCLI) - Ceph - Orchestrator

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants