Bug 1632251
Summary: | unpackaged false positives and eventual traceback | |||
---|---|---|---|---|
Product: | Red Hat Enterprise Linux 7 | Reporter: | Filip Krska <fkrska> | |
Component: | sos | Assignee: | Pavel Moravec <pmoravec> | |
Status: | CLOSED ERRATA | QA Contact: | Miroslav HradĂlek <mhradile> | |
Severity: | medium | Docs Contact: | ||
Priority: | medium | |||
Version: | 7.7 | CC: | agk, bmr, cww, fkrska, gavin, hannsj_uhl, mhradile, plambri, sbradley, yferszt | |
Target Milestone: | rc | Keywords: | Patch, Reproducer | |
Target Release: | --- | |||
Hardware: | Unspecified | |||
OS: | Unspecified | |||
Whiteboard: | ||||
Fixed In Version: | sos-3.7-1.el7 | Doc Type: | If docs needed, set a value | |
Doc Text: | Story Points: | --- | ||
Clone Of: | ||||
: | 1632607 (view as bug list) | Environment: | ||
Last Closed: | 2019-08-06 13:15:20 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: | 1594286, 1632607, 1648022 |
Description
Filip Krska
2018-09-24 13:11:02 UTC
The later has upstream PR inside #1422, https://github.com/sosreport/sos/pull/1422/commits/4280f7db3e231ce94b3141ee7358c726fe3c9100 in particular. The former: the problem seems to be elsewhere, as on my system I have in the sos_strings/unpackaged/unpackaged files like: 1) /bin/systemctl - this is due to: # rpm -ql systemd | grep /bin/systemctl /usr/bin/systemctl # while /bin is a symlink to /usr/bin we dont expand. 2) /bin/tracepath6 - b'cos all_frpm collects /usr/sbin/tracepath6 (that is a symlink to /bin/tracepath6), instead of the symlink target itself - so opposite problem to 1) I.e. we have to collect and compare "readlink -f .." when building all_frpm and all_files_system(d). The second shall be fixed by patch: --- /usr/lib/python2.7/site-packages/sos/plugins/unpackaged.py 2018-09-14 22:37:50.000000000 +0200 +++ /usr/lib/python2.7/site-packages/sos/plugins/unpackaged.py-new 2018-09-24 16:51:33.066456699 +0200 @@ -51,9 +51,9 @@ class Unpackaged(Plugin, RedHatPlugin): path = os.path.abspath(os.readlink(path)) except Exception: continue - file_list.append(path) + file_list.append(os.path.realpath(path)) for name in dirs: - file_list.append(os.path.join(root, name)) + file_list.append(os.path.realpath(os.path.join(root, name))) return file_list @@ -69,7 +69,8 @@ class Unpackaged(Plugin, RedHatPlugin): return expanded all_fsystem = [] - all_frpm = set(self.policy.mangle_package_path( + all_frpm = set(os.path.realpath(x) + for x in self.policy.mangle_package_path( self.policy.package_manager.files)) for d in get_env_path_list(): Filip, can you please try it? Or provide access to the system you see some remaining problem (after applying this patch and other than the string.splitlines()[0])? Yep, your patches appear to work as well in my env. (POSTed to upstream some time ago already) 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:2295 |