Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1355986 - KeyError['filesystem'] when running sos on RHOS7
Summary: KeyError['filesystem'] when running sos on RHOS7
Status: CLOSED DUPLICATE of bug 1393961
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: sos
Version: 7.3
Hardware: All
OS: Linux
Target Milestone: rc
: 7.4
Assignee: Pavel Moravec
QA Contact: BaseOS QE - Apps
Depends On:
TreeView+ depends on / blocked
Reported: 2016-07-13 08:32 UTC by Michele Baldessari
Modified: 2017-01-19 09:59 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2017-01-19 09:59:52 UTC

Attachments (Terms of Use)

Description Michele Baldessari 2016-07-13 08:32:39 UTC
Description of problem:
[root@mrg-06 ~]# sosreport --batch
Traceback (most recent call last):
  File "/usr/sbin/sosreport", line 25, in <module>
  File "/usr/lib/python2.7/site-packages/sos/", line 1501, in main
    sos = SoSReport(args)
  File "/usr/lib/python2.7/site-packages/sos/", line 673, in __init__
    self.policy = sos.policies.load(sysroot=self.opts.sysroot)
  File "/usr/lib/python2.7/site-packages/sos/policies/", line 40, in load
    cache['policy'] = policy(sysroot=sysroot)
  File "/usr/lib/python2.7/site-packages/sos/policies/", line 157, in __init__
    super(RHELPolicy, self).__init__(sysroot=sysroot)
  File "/usr/lib/python2.7/site-packages/sos/policies/", line 67, in __init__
    if pkgs['filesystem']['version'][0] == '3':
KeyError: 'filesystem'

This is quite weird as the filesystem package does indeed exist:
[root@mrg-06 ~]# rpm -q filesystem

If I add a "print(pkgs.keys())" before line 67 I get these, which is a small subset of all the installed ones:
[u'kbd-misc', u'python-devel', u'python-kombu', u'cyrus-sasl-md5', u'libgpg-error-devel', u'python-pycadf', u'perl-parent', u'iproute', u'perl-Time-HiRes', u'python-boto', u'python-ldap', u'python-ironicclient', u'kbd-legacy', u'perl-macros', u'openwsman-python', u'dracut-config-rescue', u'libnl3', u'libcgroup', u'libSM', u'erlang-tools', u'usbredir', u'lzo', u'iwl105-firmware', u'python-oslo-serialization', u'cyrus-sasl-lib', u'redhat-support-tool', u'libyaml', u'libxml2-devel', u'fuse-libs', u'net-tools', u'libnl3-cli', u'libselinux-utils', u'openstack-nova-api', u'redhat-lsb-core', u'libblkid', u'openstack-ceilometer-notification', u'gdbm', u'libunistring', u'perl-Business-ISBN-Data', u'rpm', u'glibc', u'libestr', u'btrfs-progs', u'shadow-utils', u'python-libguestfs', u'python-XStatic-Font-Awesome', u'python-XStatic-JQuery-quicksearch', u'selinux-policy-devel', u'openstack-tuskar', u'libbasicobjects', u'python-cffi', u'bash', u'openstack-heat-api-cloudwatch', u'libjpeg-turbo', u'atk', u'openstack-tuskar-ui', u'hardlink', u'erlang-crypto', u'python-saslwrapper', u'binutils', u'perl-DBI', u'python-elasticsearch', u'libtiff', u'python-flask-babel', u'nss', u'libguestfs-tools', u'libssh2', u'pygpgme', u'bind-libs', u'pkgconfig', u'iwl3160-firmware', u'python-ply', u'dracut', u'python-gudev', u'perl-Storable', u'iptables-services', u'graphite2', u'python-tooz', u'net-snmp-agent-libs', u'libXt', u'python-XStatic-jquery-ui', u'python-pecan', u'python-mako', u'libsemanage', u'openstack-neutron-openvswitch', u'perl-WWW-RobotRules', u'erlang-asn1', u'texlive-base', u'sudo', u'libnetfilter_cttimeout', u'mesa-libgbm', u'gcc', u'libgnome-keyring', u'python-osprofiler', u'libcap-ng', u'python-pbr', u'glusterfs-api', u'quota', u'python-dns', u'm2crypto', u'desktop-file-utils', u'openstack-ceilometer-alarm', u'python-django-bash-completion', u'python-cinderclient', u'autogen-libopts', u'libsemanage-python']

The query by command line seems fine though
# rpm -qa --queryformat "%{NAME}|%{VERSION}\\n" |wc -l

Probably relevant: this machine (it is an udnercloud) is quite overloaded:
[root@mrg-06 ~]# free
              total        used        free      shared  buff/cache   available
Mem:       12126544    11620868      158376       80032      347300       92596
Swap:       6160380     5581056      579324

Version-Release number of selected component (if applicable):
[root@mrg-06 ~]# rpm -q sos

How reproducible:
Only seen on this particular installation, so prio set to low.

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