RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1729043 - ipa-healthcheck command output is not indented by default.
Summary: ipa-healthcheck command output is not indented by default.
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: ipa-healthcheck
Version: 8.1
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: 8.0
Assignee: Rob Crittenden
QA Contact: ipa-qe
Tomas Capek
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-07-11 09:25 UTC by Nikhil Dehadrai
Modified: 2023-05-29 10:54 UTC (History)
7 users (show)

Fixed In Version: ipa-healthcheck-0.4-1
Doc Type: No Doc Update
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-04-28 15:43:29 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker FREEIPA-9936 0 None None None 2023-05-29 10:54:44 UTC
Red Hat Issue Tracker RHELPLAN-24575 0 None None None 2023-05-29 10:52:10 UTC
Red Hat Product Errata RHEA-2020:1640 0 None None None 2020-04-28 15:43:47 UTC

Description Nikhil Dehadrai 2019-07-11 09:25:14 UTC
Description of problem:
ipa-healthcheck command output is not indented by default. As a result the output cannot be read correctly.

Version-Release number of selected component (if applicable):
ipa-healthcheck-0.2-3.module+el8.1.0+3389+a3c612fa.noarch

How reproducible:
Always

Steps to Reproduce:
1. Setup ipa master using RHEL 8.1 beta repo (in my case ipa-server-4.7.90.pre1-3.module+el8.1.0+3389+a3c612fa.x86_64)
2. Setup ipa-healthcheck on this system (# dnf -y install ipa-healthcheck)
3. Run ipa-healthcheck command
# ipa-healthcheck

Actual results:
ipa-healthcheck command output is not indented by default. As a result the output cannot be read correctly. 

[root@auto-hv-01-guest10 ~]# ipa-healthcheck --output-type json
[{"source": "ipahealthcheck.meta.services", "check": "certmonger", "severity": 0, "uuid": "c849492b-9f26-4683-a74c-aa5011d07143", "when": "20190711091157Z", "duration": "0.013412", "kw": {"status": true}}, {"source": "ipahealthcheck.meta.services", "check": "dirsrv", "severity": 0, "uuid": "55c10acc-e22f-4dbb-b069-64f7fa58fb81", "when": "20190711091157Z", "duration": "0.010942", "kw": {"status": true}}, {"source": "ipahealthcheck.meta.services", "check": "gssproxy", "severity": 0, "uuid": "7f09f059-6c57-4d72-9ef1-95b2744d1cea", "when": "20190711091157Z", "duration": "0.010635", "kw": {"status": true}}, {"source": "ipahealthcheck.meta.services", "check": "httpd", "severity": 0, "uuid": "7c9fcc4c-00fe-4171-b5bd-0b56424cb1d7", "when": "20190711091157Z", "duration": "0.010448", "kw": {"status": true}}, {"source": "ipahealthcheck.meta.services", "check": "krb5kdc", "severity": 0, "uuid": "4be3fe83-2bfd-4a0d-b630-65c7b5d6811f", "when": "20190711091157Z", "duration": "0.010611", "kw": {"status": true}}, {"source": "ipahealthcheck.meta.services", "check": "named", "severity": 0, "uuid": "0268a7fd-f9b8-408d-86fc-f40680ae58c2", "when": "20190711091157Z", "duration": "0.010373", "kw": {"status": true}},

.............. Result Truncated


Expected results:
When ipa-healthcheck command is run by default, it should return the output in correct indentation so that it can be easy to interprete


Additional info:
Using command like #ipa-healthcheck --indent 4, the output was correctly indented.

[root@auto-hv-01-guest10 ~]# ipa-healthcheck --indent 4
[
    {
        "source": "ipahealthcheck.meta.services",
        "check": "certmonger",
        "severity": 0,
        "uuid": "55a8e32a-811c-4b25-bfb8-a8a8cc1b3aee",
        "when": "20190711092027Z",
        "duration": "0.013633",
        "kw": {
            "status": true
        }
    },
    {
        "source": "ipahealthcheck.meta.services",
        "check": "dirsrv",
        "severity": 0,
        "uuid": "2e91ba0c-109c-4753-8491-c488c665a647",
        "when": "20190711092027Z",
        "duration": "0.010911",
        "kw": {
            "status": true
        }
    },
.............. Result Truncated

Comment 1 Nikhil Dehadrai 2019-07-11 09:27:36 UTC
[root@auto-hv-01-guest10 ~]# ipa-healthcheck 
[{"source": "ipahealthcheck.meta.services", "check": "certmonger", "severity": 0, "uuid": "a546d785-39c7-465f-92cc-7d33e011fea0", "when": "20190711091057Z", "duration": "0.016557", "kw": {"status": true}}, {"source": "ipahealthcheck.meta.services", "check": "dirsrv", "severity": 0, "uuid": "8332b20c-b850-4a97-815d-bcced8f65a75", "when": "20190711091057Z", "duration": "0.011666", "kw": {"status": true}}, {"source": "ipahealthcheck.meta.services", "check": "gssproxy", "severity": 0, "uuid": "92979b28-c769-4ede-af34-1c23a2630c22", "when": "20190711091057Z", "duration": "0.010724", "kw": {"status": true}}, {"source": "ipahealthcheck.meta.services", "check": "httpd", "severity": 0, "uuid": "a3831ac6-907b-46d5-983f-5d12ab73b505", "when": "20190711091057Z", "duration": "0.010349", "kw": {"status": true}}, {"source": "ipahealthcheck.meta.services", "check": "krb5kdc", "severity": 0, "uuid": "adf66687-ea6d-46b6-97f8-8534dacb5d35", "when": "20190711091057Z", "duration": "0.010297", "kw": {"status": true}}, {"source": "ipahealthcheck.meta.services", "check": "named", "severity": 0, "uuid": "b9641ba3-4a9a-4c43-b4d8-7a3f921d50e4", "when": "20190711091057Z", "duration": "0.011213", "kw": {"status": true}}, {"source": "ipahealthcheck.meta.services", "check": "pki_tomcatd", "severity": 0, "uuid": "b0677e59-36a9-42db-8974-dd49d97faf4f",

.............. Output Truncated

Comment 4 Rob Crittenden 2019-07-18 12:37:25 UTC
Fixed upstream in master: 02272ff39d76f1412483c5e3289564c93d196a03

When writing JSON to stdout the indention will be 2 unless overridden.

Comment 8 Rob Crittenden 2020-04-03 12:34:27 UTC
Upstream test case
master:
https://pagure.io/freeipa/c/f5f960ed2ab08208b52260ab2dbe99da500ee04e

Comment 9 François Cami 2020-04-03 16:51:29 UTC
Upstream test case
ipa-4-8:
https://pagure.io/freeipa/c/80fe55d78c8cb409290bb8dd9619cc1089080bb2

Comment 11 errata-xmlrpc 2020-04-28 15:43:29 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, 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/RHEA-2020:1640


Note You need to log in before you can comment on or make changes to this bug.