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 1506596

Summary: redhat.py:67:__init__:KeyError: 'filesystem'
Product: Red Hat Enterprise Linux 6 Reporter: Miroslav Hradílek <mhradile>
Component: sosAssignee: Filip Krska <fkrska>
Status: CLOSED ERRATA QA Contact: Miroslav Hradílek <mhradile>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.9CC: agk, bmr, dkochuka, fkrska, gavin, isenfeld, mhradile, michele, pandrade, pbhoot, plambri, pmoravec, salmy, sbradley, supergallego31, xnie, yozone
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: All   
URL: https://github.com/sosreport/sos/pull/942
Whiteboard:
Fixed In Version: sos-3.2-62.el6 Doc Type: Bug Fix
Doc Text:
Cause: Short timeout when retrieving list of packages. Consequence: Sosreport collection fails. Fix: Retrieve list of packages without timeout. Handle missing `filesystem` package gracefully. Result: Sosreport collection proceeds without `__init__:KeyError: 'filesystem'` error.
Story Points: ---
Clone Of: 1393961 Environment:
Last Closed: 2018-06-19 05:23:14 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:
Bug Depends On: 1393961    
Bug Blocks: 1374441, 1461138, 1506659    

Description Miroslav Hradílek 2017-10-26 11:50:10 UTC
The same issue is present on RHEL 6.9 - sos-3.2-54.el6.noarch

+++ This bug was initially created as a clone of Bug #1393961 +++

The above message happens when running sosreport.

  I believe the condition may be caused by either not having a PATH
defined, or a timeout. For either case, I would suggest the pseudo
patch to /usr/lib/python2.7/site-packages/sos/policies/redhat.py:

-    _rpmq_cmd = 'rpm -qa --queryformat "%{NAME}|%{VERSION}\\n"'
+    _rpmq_cmd = '/bin/rpm -qa --queryformat "%{NAME}|%{VERSION}\\n"'

-        if pkgs['filesystem']['version'][0] == '3':
+        if pkgs.has_key('filesystem') and pkgs['filesystem']['version'][0] == '3':

Comment 2 Miroslav Hradílek 2017-11-13 15:02:08 UTC
*** Bug 1441155 has been marked as a duplicate of this bug. ***

Comment 3 Filip Krska 2017-12-17 14:05:04 UTC
I'll add pull/942 as suggested in duplicate Bug 1441155#c0

and

https://github.com/sosreport/sos/commit/4df4897146d4f2a0589a8b32532f912f1ea2ed8c

so both timeout and missing filesystem pkg issues are addressed.

Comment 15 errata-xmlrpc 2018-06-19 05:23:14 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/RHBA-2018:1920