sosreport fails during collectting container logs

Solution Verified - Updated -


  • When container_log plugin and --all-logs flag are enabled, sosreport fails with the following error:

    Traceback (most recent call last):
    File "/usr/lib/python2.7/site-packages/sos/", line 964, in setup
    File "/usr/lib/python2.7/site-packages/sos/plugins/", line 24, in setup
    NameError: global name 'logdir' is not defined


  • Red Hat Enterprise Linux 7
  • sos-3.8-9.el7_8 and earlier

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content