Actions
Bug #75802
closed
NN
NN
Invalid structured output from `ceph versions` due to unescaped newline in version String (JSON, YAML, XML)
Bug #75802:
Invalid structured output from `ceph versions` due to unescaped newline in version String (JSON, YAML, XML)
Due date:
% Done:
0%
Source:
Backport:
tentacle
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Component(RADOS):
Pull request ID:
Tags (freeform):
Merge Commit:
Fixed In:
v21.0.0-308-g047d3ee55d
Released In:
v21.2.0~863
Upkeep Timestamp:
2026-11-04T01:09:36+00:00
Description
The `ceph versions -f json` emits invalid JSON.
The version string used as a JSON key contains a raw newline character (U+000A) just before the closing quote. This newline is not escaped (\n), which violates the JSON specification.
As a result, standard JSON parsers such as jq and Python’s json.loads() fail to parse the output.
> ceph versions -f json | jq
parse error: Invalid string: control characters from U+0000 through U+001F must be escaped at line 3, column 1
> ceph versions -f json | cat -A
{"mon":{"ceph version 20.2.1-115.el9cp (5d4ea10f129b94db1b3b02d14189990b87cf2e1a) tentacle (stable - RelWithDebInfo) release 9.1.0$
":3},"mgr":{"ceph version 20.2.1-115.el9cp (5d4ea10f129b94db1b3b02d14189990b87cf2e1a) tentacle (stable - RelWithDebInfo) release 9.1.0$
":3},"osd":{"ceph version 20.2.1-115.el9cp (5d4ea10f129b94db1b3b02d14189990b87cf2e1a) tentacle (stable - RelWithDebInfo) release 9.1.0$
":24},"mds":{"ceph version 20.2.1-115.el9cp (5d4ea10f129b94db1b3b02d14189990b87cf2e1a) tentacle (stable - RelWithDebInfo) release 9.1.0$
":3},"rgw":{"ceph version 20.2.1-115.el9cp (5d4ea10f129b94db1b3b02d14189990b87cf2e1a) tentacle (stable - RelWithDebInfo) release 9.1.0$
":3},"overall":{"ceph version 20.2.1-115.el9cp (5d4ea10f129b94db1b3b02d14189990b87cf2e1a) tentacle (stable - RelWithDebInfo) release 9.1.0$
NN Updated by Naveen Naidu 8 months ago
- Pull request ID set to 68111
UB Updated by Upkeep Bot 8 months ago
- Status changed from New to Pending Backport
- Merge Commit set to 047d3ee55d663e4ab01520bb2469dd3807de0fc7
- Fixed In set to v21.0.0-308-g047d3ee55d
- Upkeep Timestamp set to 2026-04-07T06:06:00+00:00
UB Updated by Upkeep Bot 8 months ago
- Copied to Backport #75888: tentacle: Invalid structured output from `ceph versions` due to unescaped newline in version String (JSON, YAML, XML) added
UB Updated by Upkeep Bot 8 months ago
- Tags (freeform) set to backport_processed
UB Updated by Upkeep Bot 3 months ago
- Status changed from Pending Backport to Backporting
- Tags (freeform) deleted (
backport_processed) - Upkeep Timestamp changed from 2026-04-07T06:06:00+00:00 to 2026-08-27T18:29:03+00:00
UB Updated by Upkeep Bot about 1 month ago
- Released In set to v21.2.0~862
- Upkeep Timestamp changed from 2026-08-27T18:29:03+00:00 to 2026-10-24T01:16:17+00:00
UB Updated by Upkeep Bot 30 days ago
- Released In changed from v21.2.0~862 to v21.2.0~863
- Upkeep Timestamp changed from 2026-10-24T01:16:17+00:00 to 2026-11-04T01:09:36+00:00
Actions