Bug 1825961

Summary: SmartState sometimes fails to find /var/lib/rpm/Packages file, so software collection reports no packages installed
Product: Red Hat CloudForms Management Engine Reporter: Peter McGowan <pmcgowan>
Component: SmartState AnalysisAssignee: Jerry Keselman <jkeselma>
Status: CLOSED ERRATA QA Contact: Niyaz Akhtar Ansari <nansari>
Severity: high Docs Contact: Red Hat CloudForms Documentation <cloudforms-docs>
Priority: high    
Version: 5.11.5CC: akarol, bthurber, dmetzger, jkeselma, mheppler, obarenbo, sbulage, sigbjorn.lie, simaishi
Target Milestone: GAKeywords: ZStream
Target Release: 5.11.8Flags: simaishi: cfme-5.11.z+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: 5.11.8.0 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-09-30 14:01:07 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: Bug
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: CFME Core Target Upstream Version:
Embargoed:

Description Peter McGowan 2020-04-20 15:13:50 UTC
Description of problem:
SmartState Analysis sometimes fails to find the /var/lib/rpm/Packages file as the path that it looks for get incorrectly changed to /usr/lib/rpm/Packages. An error is printed in evm.log:

evm.log-20200418.gz:[----] E, [2020-04-17T12:34:56.415518 #29878:2b12acd7c5b4] ERROR -- : Q-task_id([job_dispatcher]) MIQExtract.extract File not found: '/usr/lib/rpm/Packages'

This is reproducible when scanning an CFME 5.11 appliance, or possibly any RHEL system that has a /var mount point and where /lib is also a softlink to /usr/lib

Version-Release number of selected component (if applicable):
5.11.5.0

How reproducible:
every time


Steps to Reproduce:
1. Download a CFME 5.11 VM on a network, leave powered off
2. From another (configured, region member) CFME Appliance, perform a SmartState Analysis of the first VM

Actual results:
No packages are discovered, "File not found: '/usr/lib/rpm/Packages'" found in evm.log

Expected results:
Software package list should be detected.


Additional info:

Comment 2 Niyaz Akhtar Ansari 2020-04-21 07:48:47 UTC
This issue looks similar to that one https://bugzilla.redhat.com/show_bug.cgi?id=1825225

Comment 4 Jerry Keselman 2020-05-18 15:59:22 UTC
*** Bug 1836949 has been marked as a duplicate of this bug. ***

Comment 5 mheppler 2020-05-27 08:03:12 UTC
Hello,

please, how it looks with fixing this bug?

Thank you, mheppler

Comment 7 Jerry Keselman 2020-06-23 20:30:20 UTC
I can point my finger at myself, and https://github.com/ManageIQ/manageiq-smartstate/pull/117, which fixed a different problem, as responsible for this issue.  When I (manually) back out this PR (as well as https://github.com/ManageIQ/manageiq-smartstate/pull/122, which fixed a typo in #117) on an appliance with a VM presenting this issue, the issue is bypassed.  Now to come up with the reasoning behind it.

Comment 9 Jerry Keselman 2020-07-21 11:33:16 UTC
Still working on it.

Comment 10 Jerry Keselman 2020-07-28 18:11:41 UTC
Fixed by https://github.com/ManageIQ/manageiq-smartstate/pull/134

Comment 11 Jerry Keselman 2020-08-10 15:20:29 UTC
Fix deployed in latest version of manageiq-smartstate gem v0.6.0.

Comment 13 Jerry Keselman 2020-09-03 12:23:23 UTC
Done.

Comment 14 Satoe Imaishi 2020-09-04 14:33:27 UTC
https://github.com/ManageIQ/manageiq/pull/20519

Comment 22 errata-xmlrpc 2020-09-30 14:01:07 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 (Moderate: CloudForms 5.0.8 security, 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/RHSA-2020:4134