Bug 1810194

Summary: SmartState Analysis fails to gather a present file in a Linux System
Product: Red Hat CloudForms Management Engine Reporter: Miguel Perez Colino <miguel>
Component: SmartState AnalysisAssignee: Jerry Keselman <jkeselma>
Status: CLOSED ERRATA QA Contact: Niyaz Akhtar Ansari <nansari>
Severity: medium Docs Contact: Red Hat CloudForms Documentation <cloudforms-docs>
Priority: high    
Version: 5.11.4CC: dmetzger, nansari, obarenbo, roliveri, simaishi
Target Milestone: GAKeywords: ZStream
Target Release: 5.11.5Flags: pm-rhel: cfme-5.11.z+
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: 5.11.5.0 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-05-05 13:43:32 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:
Bug Depends On: 1824259    
Bug Blocks:    

Description Miguel Perez Colino 2020-03-04 16:58:07 UTC
Description of problem:
Smart State Analysis (SSA) is configured to gather a file (and contents) and fails to do so.
The file `release` is under a linked folder `/usr/java/default` that is a link to `/usr/java/latest` which itself is a link to `/usr/java/jdk-11.0.6`

Version-Release number of selected component (if applicable):
CF 5.0.4 (CFME 5.11.4)

How reproducible:
Create a SSA profile with `/usr/java/default/release` included and try gathering it

Steps to Reproduce:
1. Create a SSA profile with `/usr/java/default/release` in the file list (retrieve content enabled)
2. Apply to a virtual machine with Oracle jdk-11.0.6 installed

Actual results:
No file gathered, does not show in the list of files for VM

Expected results:
File gathered, shows in the list of files for VM

Additional info:
Used for JDK detection for Migration Analytics.

Comment 2 Dave Johnson 2020-03-04 17:02:00 UTC
Please assess the impact of this issue and update the severity accordingly.  Please refer to https://bugzilla.redhat.com/page.cgi?id=fields.html#bug_severity for a reminder on each severity's definition.

If it's something like a tracker bug where it doesn't matter, please set the severity to Low.

Comment 3 Jerry Keselman 2020-03-05 17:11:28 UTC
Can someone provide access to the VM exhibiting this behavior?  Thanks!

Comment 4 Miguel Perez Colino 2020-03-10 11:03:06 UTC
Environment prepared.
Jerry please check your mail for access info.

Comment 6 Jerry Keselman 2020-03-24 19:11:56 UTC
PR https://github.com/ManageIQ/manageiq-smartstate/pull/117 fixes this problem.  When one component of a path had multiple symbolic links only the first was followed.  The PR follows all links for each component.

Comment 7 Jerry Keselman 2020-03-27 16:16:25 UTC
PR merged and version 0.5.4 of manageiq-smartstate released.

Comment 9 Satoe Imaishi 2020-04-03 13:35:32 UTC
https://github.com/ManageIQ/manageiq/pull/20025

Comment 13 errata-xmlrpc 2020-05-05 13:43:32 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, 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:2020