Bug 1850391

Summary: Importing procfs fails with missing module error
Product: Red Hat Enterprise Linux 8 Reporter: Matej Marušák <mmarusak>
Component: python-linux-procfsAssignee: John Kacur <jkacur>
Status: CLOSED ERRATA QA Contact: Mike Stowell <mstowell>
Severity: high Docs Contact:
Priority: urgent    
Version: 8.3CC: bhu, jeder, jskarvad, mpitt, mstowell, qzhao, rt-maint
Target Milestone: rcKeywords: Regression
Target Release: 8.3Flags: 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: 2020-11-04 02:09:48 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:    
Bug Blocks: 1823810    
Attachments:
Description Flags
Fix import of utilist none

Description Matej Marušák 2020-06-24 08:37:43 UTC
Description of problem:

Running 'tuned-adm recommend' on the latests rhel 8.3 nightly image (cockpit CI images [1]) fails with missing module error.

Version-Release number of selected component (if applicable):
tuned-2.14.0-1.el8.noarch

How reproducible:
`dnf install tuned` and then `tuned-adm recommend`.

Actual results:
```
  File "/usr/sbin/tuned-adm", line 26, in <module>
    import tuned.admin
  File "/usr/lib/python3.6/site-packages/tuned/admin/__init__.py", line 1, in <module>
    from .admin import *
  File "/usr/lib/python3.6/site-packages/tuned/admin/admin.py", line 9, in <module>
    from tuned.utils.profile_recommender import ProfileRecommender
  File "/usr/lib/python3.6/site-packages/tuned/utils/profile_recommender.py", line 4, in <module>
    import procfs
  File "/usr/lib/python3.6/site-packages/procfs/__init__.py", line 28, in <module>
    from .procfs import *
  File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 24, in <module>
    from utilist import bitmasklist
ModuleNotFoundError: No module named 'utilist'
```

Expected results:
Would show recommended profile.


Additional info:
[1] https://github.com/cockpit-project/bots/pull/1007

Comment 1 Ondřej Lysoněk 2020-06-24 08:50:42 UTC
Hi,

this is a python3-linux-procfs bug. It fails on import:
>>> import procfs
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python3.6/site-packages/procfs/__init__.py", line 28, in <module>
    from .procfs import *
  File "/usr/lib/python3.6/site-packages/procfs/procfs.py", line 24, in <module>
    from utilist import bitmasklist
ModuleNotFoundError: No module named 'utilist'

Version-Release number of selected component (if applicable):
python3-linux-procfs-0.6.2-1.el8.noarch

Comment 2 Ondřej Lysoněk 2020-06-24 09:36:27 UTC
This was even caught by gating, but the failure was waived. I don't understand on what grounds. Can you explain, John?

The problematic build is python-linux-procfs-0.6.2-1.el8. The gating waiver comment for that build says 'bz1849215'. And that bug is said to be fixed in python-linux-procfs-0.6.2-1.el8, i.e. the same build. I don't get it..

Comment 3 John Kacur 2020-06-24 19:28:59 UTC
Created attachment 1698706 [details]
Fix import of utilist

If procfs/utilist.py is not in your PYTHONPATH, the import can fail.
Specify it fully

Comment 11 errata-xmlrpc 2020-11-04 02:09:48 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 (python-linux-procfs bug fix and enhancement update), 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-2020:4584