Bug 1450134

Summary: [POD] database.yml and GUID collected as link after log collection in podified appliance
Product: Red Hat CloudForms Management Engine Reporter: Oleksii Tsuman <otsuman>
Component: ApplianceAssignee: Gregg Tanzillo <gtanzill>
Status: CLOSED CURRENTRELEASE QA Contact: Jaroslav Henner <jhenner>
Severity: high Docs Contact:
Priority: high    
Version: 5.8.0CC: abellott, gtanzill, hkataria, jhardy, jhenner, lavenel, mpovolny, obarenbo, simaishi
Target Milestone: GAKeywords: TestOnly, ZStream
Target Release: 5.9.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: log_collect:container:pod
Fixed In Version: 5.9.0.1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1478510 (view as bug list) Environment:
Last Closed: 2018-03-06 14:39:17 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: Container Management Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1478510    

Description Oleksii Tsuman 2017-05-11 15:37:06 UTC
Description of problem:

 database.yml linked to /persistent-region/region-data/var/www/miq/vmdb/config/database.yml, so after log collection we have only link, without file. Same with GUID, it linked to /persistent/server-data/var/www/miq/vmdb/GUID 


  inflating: config/database.yml~    -> /persistent-region/region-data/var/www/miq/vmdb/config/database.yml 
  inflating: config/database.yml     -> /persistent-region/region-data/var/www/miq/vmdb/config/database.yml 
  inflating: config/settings.yml~    
  inflating: config/settings.yml     
  inflating: ROOT/var/log/messages   
  inflating: BUILD                   
  inflating: GUID                    -> /persistent/server-data/var/www/miq/vmdb/GUID 


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


How reproducible:


Steps to Reproduce:
1. Login into appliance 
2. Go to Configuration -> Diagnostics -> Log Collection -> Edit 
3. Set correct log depot settings
4. Collect logs
5. Unzip collected file

Actual results:
database.yml and GUID collected as links but not like an actual file

Expected results:
database.yml and GUID collected as file 

Additional info:

Comment 7 Franco Bladilo 2017-06-05 14:18:08 UTC
In 4.5 database.yml, GUID along with other files are symlinks to the real files on persistent volumes for the openshift appliance builds. My assumption is that the log collection routines are not following symlinks for files.

As a heads up, in the latest upstream code, database.yml has moved from a file configuration to an URL based one, see here : 

https://github.com/ManageIQ/manageiq-pods/pull/155

GUID still remains a symlinked file along with others.

Comment 10 Bo Yao 2017-06-21 13:35:20 UTC
PR: https://github.com/ManageIQ/manageiq/pull/15420

Comment 11 CFME Bot 2017-07-06 13:21:38 UTC
New commit detected on ManageIQ/manageiq/master:
https://github.com/ManageIQ/manageiq/commit/2063a7687462b706192b24c6b81ac390251b4c66

commit 2063a7687462b706192b24c6b81ac390251b4c66
Author:     Bo Yao <boyao>
AuthorDate: Mon Jun 19 15:51:03 2017 -0400
Commit:     Bo Yao <boyao>
CommitDate: Mon Jun 26 10:28:58 2017 -0400

    follow symlinks recursively when add entry to zip
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1450134

 lib/vmdb/util.rb | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

Comment 13 Oleksii Tsuman 2017-11-20 12:28:27 UTC
verified in 5.9.0.8.20171109215303_ed87902