Bug 1718087
Summary: | sosreport fails on name = self.get_local_name().split('.')[0] | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 8 | Reporter: | Chris Cheney <ccheney> |
Component: | sos | Assignee: | Pavel Moravec <pmoravec> |
Status: | CLOSED ERRATA | QA Contact: | Martin KlusoĊ <mkluson> |
Severity: | high | Docs Contact: | |
Priority: | high | ||
Version: | 8.0 | CC: | agk, bmr, gavin, jhunsaker, jortialc, mhradile, mkluson, mschibli, plambri, sbradley, vinzenz.meier |
Target Milestone: | rc | Keywords: | Patch |
Target Release: | 8.0 | ||
Hardware: | All | ||
OS: | All | ||
Whiteboard: | |||
Fixed In Version: | sos-3.7-2.el8 | Doc Type: | If docs needed, set a value |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2019-11-05 22:32:24 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: |
Description
Chris Cheney
2019-06-06 20:59:17 UTC
Reproducer: register a RHEL8 system to Satellite5 (i.e. following https://access.redhat.com/solutions/1282753). Then just run sosreport .. Interesting. I was under the impression registering RHEL8 against a Sat 5 deployment was unsupported. In any case, the fix remains the same. +1 to dropping the rhn calls in the redhat policy entirely and just going with hostname. Minimalistic code workaround: sed -i.orig "s/self.rhn_username() or //g" /usr/lib/python3.6/site-packages/sos/policies/redhat.py (to revert the change, either reinstall sos package or "/usr/bin/mv /usr/lib/python3.6/site-packages/sos/policies/redhat.py{.orig,}" ) The problem happens on RHEL8 or mor precisely with python3, only. Since: $ python2.7 Python 2.7.15 (default, Oct 15 2018, 15:24:06) [GCC 8.1.1 20180712 (Red Hat 8.1.1-5)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> 'admin'.encode('utf-8', 'ignore').split('.')[0] 'admin' >>> vs.: $ python3.6 Python 3.6.8 (default, Mar 21 2019, 10:08:12) [GCC 8.3.1 20190223 (Red Hat 8.3.1-2)] on linux Type "help", "copyright", "credits" or "license" for more information. >>> 'admin'.encode('utf-8', 'ignore').split('.')[0] Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: a bytes-like object is required, not 'str' >>> For QE: reproducer without the need to register to sat5 (to mock the registration): dnf install rhn-setup # loads some required python libs, from RHEL8 BaseOS and AppStream repos echo '<?xml version="1.0"?> <params> <param> <value><struct> <member> <name>username</name> <value><string>admin</string></value> </member> </struct></value> </param> </params>' > /etc/sysconfig/rhn/systemid sosreport # whatever params 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/RHEA-2019:3640 |