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 /]#
$ sudo ceph-volume simple scan /dev/sdb1 --stdout 2> /dev/null { "active": "ok", "ceph_fsid": "1c164a8d-f6c2-42c5-99a5-cc9d8504a293", "cluster_name": "ceph", "data": { "path": "/dev/sdb1", "uuid": "17e6ec1b-3dc6-44b5-bc65-ffe40c46a11a" }, "fsid": "17e6ec1b-3dc6-44b5-bc65-ffe40c46a11a", "journal": { "path": "/dev/sdd1", "uuid": "2af4d577-e052-457a-85a6-8df872885957" }, "journal_uuid": "2af4d577-e052-457a-85a6-8df872885957", "keyring": "AQBo4vldLJGgFRAAULX66Xr2cZhPr9Bs0rFh0A==", "magic": "ceph osd volume v026", "none": "", "ready": "ready", "require_osd_release": 14, "type": "filestore", "whoami": 21 } $ rpm -qa|grep ceph-osd ceph-osd-14.2.4-27.el7cp.x86_64 Moving to VERIFIED state Regards, Vasishta Shastry QE, Ceph
*** Bug 1756366 has been marked as a duplicate of this bug. ***
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