Bug 1450134 - [POD] database.yml and GUID collected as link after log collection in podified appliance
Summary: [POD] database.yml and GUID collected as link after log collection in podifie...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Appliance
Version: 5.8.0
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: GA
: 5.9.0
Assignee: Gregg Tanzillo
QA Contact: Jaroslav Henner
URL:
Whiteboard: log_collect:container:pod
Depends On:
Blocks: 1478510
TreeView+ depends on / blocked
 
Reported: 2017-05-11 15:37 UTC by Oleksii Tsuman
Modified: 2018-03-06 14:39 UTC (History)
9 users (show)

Fixed In Version: 5.9.0.1
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1478510 (view as bug list)
Environment:
Last Closed: 2018-03-06 14:39:17 UTC
Category: ---
Cloudforms Team: Container Management
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

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


Note You need to log in before you can comment on or make changes to this bug.