Bug 1975102

Summary: [RADOS] ceph mon stat --format json-pretty return output in plain format
Product: [Red Hat Storage] Red Hat Ceph Storage Reporter: Vasishta <vashastr>
Component: RADOSAssignee: Neha Ojha <nojha>
Status: CLOSED ERRATA QA Contact: Pawan <pdhiran>
Severity: high Docs Contact:
Priority: unspecified    
Version: 4.2CC: akupczyk, bhubbard, ceph-eng-bugs, kdreyer, nojha, pdhiran, rzarzyns, sseshasa, vumrao
Target Milestone: ---   
Target Release: 4.3   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: ceph-14.2.22-1.el8cp ceph-14.2.22-1.el7cp Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-05-05 07:53:24 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Vasishta 2021-06-23 06:48:13 UTC
Description of problem:
ceph mon stat --format json-pretty return output in plain format

Version-Release number of selected component (if applicable):
ceph version 14.2.11-181.el8cp 

How reproducible:
Always

Steps to Reproduce:
1. In 4.x cluster try to retrieve mon status in json-pretty format

Actual results:
[root@e22-h18-b04-fc640 ~]# sudo ceph mon stat --format json-pretty

e1: 3 mons at {e22-h14-b04-fc640=[v2:172.16.39.51:3300/0,v1:172.16.39.51:6789/0],e22-h18-b01-fc640=[v2:172.16.36.221:3300/0,v1:172.16.36.221:6789/0],e22-h18-b04-fc640=[v2:172.16.37.23:3300/0,v1:172.16.37.23:6789/0]}, election epoch 146, leader 0 e22-h18-b01-fc640, quorum 0,2 e22-h18-b01-fc640,e22-h14-b04-fc640


Expected results:
[ceph: root@magna008 /]# ceph mon stat --format json-pretty

{
    "epoch": 3,
    "min_mon_release_name": "pacific",
    "num_mons": 3,
    "leader": "magna008",
    "quorum": [
        {
            "rank": 0,
            "name": "magna008"
        },
        {
            "rank": 1,
            "name": "magna057"
        },
        {
            "rank": 2,
            "name": "magna110"
        }
    ]
}

Additional info:
(Already fixed upstream, Filed BZ to track verification in 4.3)

Comment 11 errata-xmlrpc 2022-05-05 07:53:24 UTC
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 (Moderate: Red Hat Ceph Storage 4.3 Security and Bug Fix update), 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/RHSA-2022:1716