Bug #73086
closedceph osd blocklist ls --format=json produces non-json output
100%
Description
# ceph osd blocklist ls --format json
[{"addr":"192.168.122.2:0/0","until":"2025-09-17T12:20:36.394095+0000"}][{"range":"192.168.122.0:0/24","until":"2025-09-17T12:20:45.954058+0000"}]listed 2 entries
The (standard) output of a command with --format=json should produce JSON that is compatible with normal JSON parsers (like jq). This command produces two independent "json chunks" followed by an entirely non-json string.
The command should output something like the following instead:
[
[{"addr":"192.168.122.2:0/0","until":"2025-09-17T12:20:36.394095+0000"}],
[{"range":"192.168.122.0:0/24","until":"2025-09-17T12:20:45.954058+0000"}]
]
or an object based variant:
{
"addrs": [{"addr":"192.168.122.2:0/0","until":"2025-09-17T12:20:36.394095+0000"}],
"ranges": [{"range":"192.168.122.0:0/24","until":"2025-09-17T12:20:45.954058+0000"}]
}
but the exact JSON structure is less important than producing a usable "JSON document".
This is desired for automation tools to avoid the need to parse the text based output meant for humans.
RZ Updated by Radoslaw Zarzynski about 1 year ago
- Tags set to low-hanging-fruit
MW Updated by Matty Williams about 1 year ago
Looking in to this as a first issue.
RZ Updated by Radoslaw Zarzynski about 1 year ago
- Status changed from New to In Progress
- Assignee set to Matty Williams
(per the last comment)
MW Updated by Matty Williams about 1 year ago
- % Done changed from 0 to 90
RZ Updated by Radoslaw Zarzynski about 1 year ago
Bump up.
RZ Updated by Radoslaw Zarzynski about 1 year ago
@Matty Williams: are you working on this?
MW Updated by Matty Williams about 1 year ago
Radoslaw Zarzynski wrote in #note-6:
@Matty Williams: are you working on this?
I have created a pull request here: https://github.com/ceph/ceph/pull/65681
I am waiting for the pull request to be reviewed.
MW Updated by Matty Williams about 1 year ago
- Status changed from In Progress to Fix Under Review
- % Done changed from 90 to 100
RZ Updated by Radoslaw Zarzynski about 1 year ago
- Pull request ID set to 65681
RZ Updated by Radoslaw Zarzynski about 1 year ago
bug scrub note: left a review. It seems to me we need to be worried about the backward compatibility.
LF Updated by Laura Flores about 1 year ago
Scrub note: undergoing further review
RZ Updated by Radoslaw Zarzynski about 1 year ago
I will re-review.
RZ Updated by Radoslaw Zarzynski about 1 year ago
Approved but also flagged and DNM because of the dependency on the Umbrella's feature bit.
RZ Updated by Radoslaw Zarzynski about 1 year ago
scrub note: talked about the Umbrella kickoff PR during today's CSC. Looking for volunteers; if nobody comes, I will do.
LF Updated by Laura Flores 12 months ago
Radoslaw Zarzynski wrote in #note-14:
scrub note: talked about the Umbrella kickoff PR during today's CSC. Looking for volunteers; if nobody comes, I will do.
Scrub note: Umbrella kickoff PR has been started here: https://github.com/ceph/ceph/pull/66524
I added a note about it on the PR.
LF Updated by Laura Flores 12 months ago
Bump up
RZ Updated by Radoslaw Zarzynski 11 months ago
Approved but waiting the Umbrella feature bit.
RZ Updated by Radoslaw Zarzynski 11 months ago
Bump up.
RZ Updated by Radoslaw Zarzynski 10 months ago
Sill waiting for the feature bit.
UB Updated by Upkeep Bot 3 months ago
- Status changed from Fix Under Review to Resolved
- Merge Commit set to 2684c4203f929aff06324e91d26eb261b97cb417
- Fixed In set to v21.3.0-2974-g2684c4203f
- Upkeep Timestamp set to 2026-09-04T23:02:24+00:00