Project

General

Profile

Actions

Bug #73086

closed
JM MW

ceph osd blocklist ls --format=json produces non-json output

Bug #73086: ceph osd blocklist ls --format=json produces non-json output

Added by John Mulligan about 1 year ago. Updated 3 months ago.

Status:
Resolved
Priority:
Normal
Category:
Introspection/Control
Target version:
-
Due date:
% Done:

100%

Source:
Backport:
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Component(RADOS):
ceph cli
Pull request ID:
Tags (freeform):
Fixed In:
v21.3.0-2974-g2684c4203f
Released In:
Upkeep Timestamp:
2026-09-04T23:02:24+00:00

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 Actions #1

  • Tags set to low-hanging-fruit

MW Updated by Matty Williams about 1 year ago Actions #2

Looking in to this as a first issue.

RZ Updated by Radoslaw Zarzynski about 1 year ago Actions #3

  • 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 Actions #4

  • % Done changed from 0 to 90

RZ Updated by Radoslaw Zarzynski about 1 year ago Actions #5

Bump up.

RZ Updated by Radoslaw Zarzynski about 1 year ago Actions #6

@Matty Williams: are you working on this?

MW Updated by Matty Williams about 1 year ago Actions #7

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 Actions #8

  • Status changed from In Progress to Fix Under Review
  • % Done changed from 90 to 100

RZ Updated by Radoslaw Zarzynski about 1 year ago Actions #9

  • Pull request ID set to 65681

RZ Updated by Radoslaw Zarzynski about 1 year ago Actions #10

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 Actions #11

Scrub note: undergoing further review

RZ Updated by Radoslaw Zarzynski about 1 year ago Actions #12

I will re-review.

RZ Updated by Radoslaw Zarzynski about 1 year ago Actions #13

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 Actions #14

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 Actions #15

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 Actions #16

Bump up

RZ Updated by Radoslaw Zarzynski 11 months ago Actions #17

Approved but waiting the Umbrella feature bit.

RZ Updated by Radoslaw Zarzynski 11 months ago Actions #18

Bump up.

RZ Updated by Radoslaw Zarzynski 10 months ago Actions #19

Sill waiting for the feature bit.

UB Updated by Upkeep Bot 3 months ago Actions #20

  • 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
Actions

Also available in: PDF Atom