Bug 2223526

Summary: sos immediately crashes: Could not initialize 'report': 'ConfigParser' object has no attribute 'readfp'
Product: [Fedora] Fedora Reporter: Martin Pitt <mpitt>
Component: sosAssignee: Sandro Bonazzola <sbonazzo>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: urgent Docs Contact:
Priority: high    
Version: rawhideCC: bmr, jcastillo, mmarusak, sbonazzo
Target Milestone: ---Keywords: Regression
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard: CockpitTest
Fixed In Version: sos-4.5.6-1.fc39 Doc Type: Bug Fix
Doc Text:
Cause: in Python 3.12 configparser.ConfigParser no longer has a readfp method. Consequence: sos report crashes due to the missing function. Fix: Use read_file() instead. Result: sos report works as expected
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-07-24 06:14:58 UTC Type: ---
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: 2224676    

Description Martin Pitt 2023-07-18 06:18:12 UTC
This is apparently fallout from the Python 3.12 transition, similar to bug 2176174 and bug 2221311.

Reproducible: Always

Steps to Reproduce:
sos report
Actual Results:  
Could not initialize 'report': 'ConfigParser' object has no attribute 'readfp'

sos-4.5.5-2.fc39.noarch

Comment 1 Sandro Bonazzola 2023-07-18 06:26:08 UTC
Reported upstream to https://github.com/sosreport/sos/issues/3308

Comment 2 Sandro Bonazzola 2023-07-18 07:06:48 UTC
Pushed a fix: https://github.com/sosreport/sos/pull/3309

Comment 3 Sandro Bonazzola 2023-07-18 07:46:36 UTC
Martin is this issue blocking something? Is a rebuild with the fix needed urgently or can it wait till next sos release (which should happen soon, around the end of July)?

Comment 4 Martin Pitt 2023-07-18 08:17:03 UTC
Sandro: Not for me personally, or for cockpit. I created a "naughty pattern" and a tracker in https://github.com/cockpit-project/bots/issues/5016 so that it doesn't block our tests, which "shuts it up". However, I don't have a good gut feeling how many people (try to) use sos in Rawhide. Thanks!

Comment 5 Sandro Bonazzola 2023-07-18 08:40:41 UTC
Ok, so I'll try get the patch merged upstream and included in next upstream release.

Comment 6 Jose Castillo 2023-07-18 09:45:18 UTC
I've ack'ed the PR upstream, so hopefully when Jake comes online he approves and merges it, in time for 4.5.6

Comment 7 Fedora Update System 2023-07-24 06:12:23 UTC
FEDORA-2023-93a10ee1a9 has been submitted as an update to Fedora 39. https://bodhi.fedoraproject.org/updates/FEDORA-2023-93a10ee1a9

Comment 8 Fedora Update System 2023-07-24 06:14:58 UTC
FEDORA-2023-93a10ee1a9 has been pushed to the Fedora 39 stable repository.
If problem still persists, please make note of it in this bug report.