Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
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 2131025

Summary: [Insights-client] ParseException: Failed to parser yum repolist: Line containing 'repo id' was not found in table
Product: Red Hat Enterprise Linux 9 Reporter: mabezerr
Component: insights-clientAssignee: Nobody <nobody>
Status: CLOSED DUPLICATE QA Contact: mabezerr
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 9.1CC: cmarinea, fjansen, mabezerr, stomsa
Target Milestone: rcKeywords: Triaged
Target Release: ---Flags: pm-rhel: mirror+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-10-06 17:17:46 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 mabezerr 2022-09-29 17:43:15 UTC
>>> Description of problem:
Problem #1: 
When calling 'insights-client --show-results' without calling 'insights-client --check-results', an empty list is returned. Nothing indicates to the user to use 'insights-client --check-results' before, so, in this case, we could improve this output suggesting this command to the user.

Problem #2:
After using 'insights-client --show-results' command, and then calling 'insights-client', we can see an exception on logs.

>>> Version-Release number of selected component (if applicable):
# cat /etc/redhat-release 
Red Hat Enterprise Linux release 9.1 Beta (Plow)
# rpm -qa |grep insights
insights-client-3.1.7-9.el9.noarch

>>> Steps to Reproduce:
1. # insights-client --show-results
[]
2. # insights-client

>>> Actual results:
We have an exception when calling insights-client after using '--show-results' flag:

'''
# insights-client 
Starting to collect Insights data for mabezerr-rhel91-selinux
Traceback (most recent call last):
  File "/var/lib/insights/last_stable.egg/insights/parsers/yum.py", line 144, in parse_content
    self.data = parse_fixed_table(
  File "/var/lib/insights/last_stable.egg/insights/parsers/__init__.py", line 357, in parse_fixed_table
    first_line = calc_offset(table_lines, heading_ignore)
  File "/var/lib/insights/last_stable.egg/insights/parsers/__init__.py", line 291, in calc_offset
    raise ValueError("Line containing '{}' was not found in table".format(','.join(target)))
ValueError: Line containing 'repo id' was not found in table
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "/var/lib/insights/last_stable.egg/insights/core/dr.py", line 967, in run
    result = DELEGATES[component].process(broker)
  File "/var/lib/insights/last_stable.egg/insights/core/dr.py", line 686, in process
    return self.invoke(broker)
  File "/var/lib/insights/last_stable.egg/insights/core/plugins.py", line 130, in invoke
    return self.component(dep_value)
  File "/var/lib/insights/last_stable.egg/insights/core/__init__.py", line 598, in __init__
    super(CommandParser, self).__init__(context)
  File "/var/lib/insights/last_stable.egg/insights/core/__init__.py", line 91, in __init__
    self._handle_content(context)
  File "/var/lib/insights/last_stable.egg/insights/core/__init__.py", line 94, in _handle_content
    self.parse_content(context.content)
  File "/var/lib/insights/last_stable.egg/insights/parsers/yum.py", line 152, in parse_content
    raise ParseException('Failed to parser yum repolist: {0}'.format(str(e)))
insights.parsers.ParseException: Failed to parser yum repolist: Line containing 'repo id' was not found in table
soscleaner is a tool to help obfuscate sensitive information from an existing sosreport.
Please review the content before passing it along to any third party.
/var/tmp/insights-client/insights-archive-n6s9laih/insights-mabezerr-rhel91-selinux-20220929171515 appears to be a inode/directory - continuing
Working Directory - /var/tmp/insights-client/insights-archive-n6s9laih/soscleaner-6956467677897058
Completed IP Report
Completed Hostname Report
Completed Domainname Report
Beginning Clean Up Process
Removing Working Directory - /var/tmp/insights-client/insights-archive-n6s9laih/soscleaner-6956467677897058
Clean Up Process Complete
Archiving Complete
Writing RHSM facts to /etc/rhsm/facts/insights-client.facts...
Uploading Insights data.
Successfully uploaded report from mabezerr-rhel91-selinux to account 6089719.
View details about this system on console.redhat.com:
https://console.redhat.com/insights/inventory/d383d73b-4d12-4a45-822d-ccf3a0ae6c21
'''

>>> Expected results:
- No exception should be returned.

- Also, it would be a nice improvement not only return an empty list to the user when calling 'insights-client --show-results' if 'insights-client --check-results' was not used before. It would be intuitive return the empty list and also indicate to the user that, to collect more results, the user should use 'insights-client --check-results' command first.


>>> Additional info:
This bug has been reported by @msager in our Test Day. It was originally reported in this card: INSIGHTSQA-3538

Comment 1 mabezerr 2022-10-06 17:17:46 UTC

*** This bug has been marked as a duplicate of bug 2091084 ***