Skip to content

mon: Fix json format for osd blocklist ls - #65681

Merged
SrinivasaBharath merged 1 commit into
ceph:mainfrom
MattyWilliams22:json-format
Sep 4, 2026
Merged

SrinivasaBharath merged 1 commit into
ceph:mainfrom
MattyWilliams22:json-format

Conversation

@MattyWilliams22

@MattyWilliams22 MattyWilliams22 commented Sep 25, 2025 •

Copy link
Copy Markdown
Contributor

Depends on: #66524

Combined json chunks into a single json list and removed trailing non-json string.

Fixes: https://tracker.ceph.com/issues/73086
Signed-off-by: Matty Williams [email protected]

Commit includes:

  1. Created new array section to surround blocklist and range_blocklist array sections.
  2. Removed trailing string from json and xml formats.
  3. Modified function that calls this command to process this new json format.

Contribution Guidelines

  • To sign and title your commits, please refer to Submitting Patches to Ceph.

  • If you are submitting a fix for a stable branch (e.g. "quincy"), please refer to Submitting Patches to Ceph - Backports for the proper workflow.

  • When filling out the below checklist, you may click boxes directly in the GitHub web UI. When entering or editing the entire PR message in the GitHub web UI editor, you may also select a checklist item by adding an x between the brackets: [x]. Spaces and capitalization matter when checking off items this way.

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

You must only issue one Jenkins command per-comment. Jenkins does not understand
comments with more than one command.

@MattyWilliams22
MattyWilliams22 requested a review from a team as a code owner September 25, 2025 13:25
@bill-scales
bill-scales self-requested a review September 25, 2025 14:14
@MattyWilliams22

Copy link
Copy Markdown
Contributor Author

jenkins test make check

@MattyWilliams22

Copy link
Copy Markdown
Contributor Author

jenkins test api

@MattyWilliams22 MattyWilliams22 self-assigned this Oct 10, 2025
Comment thread src/pybind/mgr/prometheus/module.py Resolved
@rzarzynski
rzarzynski self-requested a review November 24, 2025 21:01
@ronen-fr

Copy link
Copy Markdown
Contributor

A suggestion: using the 'scoped' version of the section/array commands can simplify the code (e.g. save you the 'if' before the 'close()'). See for example ECSubRead::dump().

@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.

LGTM with some tiny nit. However, we cannot merge right now as the Umbrella's feature bit is not available yet, and thus I'm both approving and marking as DO NOT MERGE.

Comment thread src/mon/OSDMonitor.cc Resolved
Comment thread src/mon/OSDMonitor.cc Resolved
Comment thread src/pybind/mgr/prometheus/module.py Resolved
Comment thread src/mon/OSDMonitor.cc Resolved
@ljflores

ljflores commented Dec 8, 2025

Copy link
Copy Markdown
Member

@MattyWilliams22 @bill-scales here's the umbrella kickoff PR: #66524

Perhaps the feature bit you need is there.

@ljflores

Copy link
Copy Markdown
Member

ping @MattyWilliams22

@rzarzynski

Copy link
Copy Markdown
Contributor

@ljflores: the kick-off PR needs to be merged first.

@github-actions

Copy link
Copy Markdown

This pull request has been automatically marked as stale because it has not had any activity for 60 days. It will be closed if no further activity occurs for another 30 days.
If you are a maintainer or core committer, please follow-up on this pull request to identify what steps should be taken by the author to move this proposed change forward.
If you are the author of this pull request, thank you for your proposed contribution. If you believe this change is still appropriate, please ensure that any feedback has been addressed and ask for a code review.

@tchaikov tchaikov 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.

@MattyWilliams22 hi Matty, thanks for fixing this. just a bug -- the falback searches in the wrong variable.

Comment thread src/mon/OSDMonitor.cc Resolved
Comment thread src/pybind/mgr/prometheus/module.py Resolved
@MattyWilliams22

Copy link
Copy Markdown
Contributor Author

jenkins test make check

@MattyWilliams22

Copy link
Copy Markdown
Contributor Author

jenkins test make check arm64

@bill-scales bill-scales 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.

LGTM

@MattyWilliams22

Copy link
Copy Markdown
Contributor Author

jenkins test make check

@MattyWilliams22

Copy link
Copy Markdown
Contributor Author

jenkins test make check arm64

@MattyWilliams22

Copy link
Copy Markdown
Contributor Author

jenkins test make check

1 similar comment
@tchaikov

tchaikov commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

jenkins test make check

@tchaikov

tchaikov commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

jenkins test make check arm64

Combine json chunks into a single json list and removed trailing non-json string.
Check server version to decide which version of the message to respond with.
Attempt to parse new format, but fall back to parsing old format if this fails.

Fixes: https://tracker.ceph.com/issues/73086
Signed-off-by: Matty Williams <[email protected]>
@MattyWilliams22

Copy link
Copy Markdown
Contributor Author

jenkins test windows

1 similar comment
@MattyWilliams22

Copy link
Copy Markdown
Contributor Author

jenkins test windows

@SrinivasaBharath

Copy link
Copy Markdown
Contributor

This PR has been added to wip-bharath2-testing-20260727.155959-main.

@ljflores

ljflores commented Sep 4, 2026

Copy link
Copy Markdown
Member

@SrinivasaBharath
SrinivasaBharath merged commit 2684c42 into ceph:main Sep 4, 2026
6 checks passed
@github-actions

github-actions Bot commented Sep 4, 2026

Copy link
Copy Markdown

This is an automated message by src/script/redmine-upkeep.py.

I have resolved the following tracker ticket due to the merge of this PR:

No backports are pending for the ticket. If this is incorrect, please update the tracker
ticket and reset to Pending Backport state.

Update Log: https://github.com/ceph/ceph/actions/runs/33927819397

mergify Bot pushed a commit to ceph/go-ceph that referenced this pull request Sep 8, 2026
With recently merged changes[1], ceph monitors return both blocklist
types in one JSON object. Decode that format while retaining the legacy
response fallback.

[1] ceph/ceph#65681

Signed-off-by: Anoop C S <[email protected]>
@MattyWilliams22
MattyWilliams22 deleted the json-format branch September 18, 2026 08:40
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.

7 participants