DescriptionGuillaume Abrioux
2019-08-07 13:46:45 UTC
Description of problem:
Cloned from https://tracker.ceph.com/issues/38548
When requesting ceph-volume to print json output, messages and errors are printed to stdout.
The printed json can't be consumed given that it's seen as invalid json.
seen on ceph version 14.2.2-298-g0bdfdc6 (0bdfdc6b5433736bd11c321ecfa559f3b30f9187) nautilus (stable)
How reproducible:
100%
Steps to Reproduce:
1. ask ceph-volume to output using --format json
Actual results:
ceph-volume outputs json with extra messages in addition on stdout, which makes the json as invalid.
Expected results:
ceph-volume outputs only json data on stdout.
Typical output:
[root@osd1 /]# ceph-volume simple scan /dev/sda1 --stdout 2>/dev/null
Running command: /usr/sbin/cryptsetup status /dev/sda1
Running command: /bin/mount -v /dev/sda1 /tmp/tmp_NrdoM
stdout: mount: /dev/sda1 mounted on /tmp/tmp_NrdoM.
Running command: /bin/umount -v /tmp/tmp_NrdoM
{
"active": "ok",
"ceph_fsid": "f3ea8c89-3b32-4abd-8aa9-07d1e6319e3b",
"cluster_name": "ceph",
"data": {
"path": "/dev/sda1",
"uuid": "de0465d1-b00b-4bd6-b1da-92e8f6cf0aef"
},
"fsid": "de0465d1-b00b-4bd6-b1da-92e8f6cf0aef",
"journal": {
"path": "/dev/sdc1",
"uuid": "b8e4707c-c28a-45fb-913f-6680a5f3b2d4"
},
"journal_uuid": "b8e4707c-c28a-45fb-913f-6680a5f3b2d4",
"keyring": "AQDSiUld6XdXGxAAksb27KOAv5/byZ9ybu8J9w==",
"magic": "ceph osd volume v026",
"none": "",
"ready": "ready",
"require_osd_release": 14,
"type": "filestore",
"whoami": 10
}
[root@osd1 /]#
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory, and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.
https://access.redhat.com/errata/RHBA-2020:0312