Project

General

Profile

Actions

Bug #3748

closed

ceph osd dump --format=json includes non-JSON line

Added by Dan Mick over 11 years ago. Updated over 11 years ago.

Status:
Resolved
Priority:
Urgent
Category:
-
Target version:
-
% Done:

0%

Source:
Development
Tags:
Backport:
Regression:
Severity:
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

ceph osd dump --format=json includes the non-JSON "dumped osdmap epoch N" at the top of the output, which of course breaks parsing.

This is a symptom of a larger problem, where messages in the 'reply string' part of the message are output to stdout if no error, stderr if err, but then also the 'reply bufferlist' is output
(to stdout, or the file specified). We should probably clarify which messages are 'status only'
and therefore appropriate for stderr, and which are actually "data payload" for stdout.

The other option is just not to do statusy-type things when outputting formatted data.

Actions

Also available in: Atom PDF