Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
Red Hat Satellite engineering is moving the tracking of its product development work on Satellite 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 "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. 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 "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-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.
When analyzing the json data inside RH inventory tar file - report_for_1.tar.gz - the json data is not parsable. For example:
───────────────────────────────────
[root@iridium tmp]# cat 49154599-35a5-4be7-a6ba-9d9ec9b72c59.json | json_reformat
...
"libselinux-2.5-11.el7.x86_64",
parse error: unallowed token at this point in JSON text
6_64", "nss-util-3.28.4-3.el7.
(right here) ------^
"info-5.1-4.el7.x86_64"
───────────────────────────────────
[root@iridium tmp]# cat 49154599-35a5-4be7-a6ba-9d9ec9b72c59.json | python -m json.tool
No JSON object could be decoded
───────────────────────────────────
The problem appears to be that the parsers fail to prettify json output when they encounter a string of commas and spaces, here:
───────────────────────────────────
[root@iridium tmp]# cat 49154599-35a5-4be7-a6ba-9d9ec9b72c59.json | grep -o ', , ,' | wc -l
76
───────────────────────────────────
And for a generated json file that parses without error:
───────────────────────────────────
╰─ cat 242724c2-9cd6-465d-b8d0-8320d57c97ce.json | grep -o ', , ,' | wc -l
0
───────────────────────────────────
Customers who want to view the report information will not be able to if the information is not parsable with these tools.
The report can be successfully parsed after removing the extra commas and spaces:
───────────────────────────────────
[root@iridium ~]# grep -o fqdn 566cdc6d-fd70-4e04-9277-b0afba5e0a82.json | python -m json.tool
No JSON object could be decoded
───────────────────────────────────
Number of host entries:
[root@iridium ~]# grep -o fqdn 566cdc6d-fd70-4e04-9277-b0afba5e0a82.json | wc -l
586
Removing extra commas and spaces:
[root@iridium ~]# cat 566cdc6d-fd70-4e04-9277-b0afba5e0a82.json | tr ' ' '\n' | sed 's/^,//g' | tr -d '\n' | python -m json.tool | tail -n5
"vm_uuid": "5a2f8602-ea12-4685-ad5c-c919cc8b2d5f"
}
],
"report_slice_id": "566cdc6d-fd70-4e04-9277-b0afba5e0a82"
}
───────────────────────────────────
The same number of hosts is kept after this editing:
[root@iridium ~]# cat 566cdc6d-fd70-4e04-9277-b0afba5e0a82.json | tr ' ' '\n' | sed 's/^,//g' | tr -d '\n' | python -m json.tool | grep fqdn | wc -l
586
It should be noted that the number of hosts in the report does not match the number of hosts in the Satellite:
───────────────────────────────────
[root@iridium ~]# hammer host list | wc -l
858
───────────────────────────────────
[root@iridium ~]# grep -o fqdn 566cdc6d-fd70-4e04-9277-b0afba5e0a82.json | wc -l
586
When analyzing the json data inside RH inventory tar file - report_for_1.tar.gz - the json data is not parsable. For example: ─────────────────────────────────── [root@iridium tmp]# cat 49154599-35a5-4be7-a6ba-9d9ec9b72c59.json | json_reformat ... "libselinux-2.5-11.el7.x86_64", parse error: unallowed token at this point in JSON text 6_64", "nss-util-3.28.4-3.el7. (right here) ------^ "info-5.1-4.el7.x86_64" ─────────────────────────────────── [root@iridium tmp]# cat 49154599-35a5-4be7-a6ba-9d9ec9b72c59.json | python -m json.tool No JSON object could be decoded ─────────────────────────────────── The problem appears to be that the parsers fail to prettify json output when they encounter a string of commas and spaces, here: ─────────────────────────────────── [root@iridium tmp]# cat 49154599-35a5-4be7-a6ba-9d9ec9b72c59.json | grep -o ', , ,' | wc -l 76 ─────────────────────────────────── And for a generated json file that parses without error: ─────────────────────────────────── ╰─ cat 242724c2-9cd6-465d-b8d0-8320d57c97ce.json | grep -o ', , ,' | wc -l 0 ─────────────────────────────────── Customers who want to view the report information will not be able to if the information is not parsable with these tools.