Bug 1656318

Summary: Automate model and service dialogs are not collected during log collection for NFS and Samba types
Product: Red Hat CloudForms Management Engine Reporter: Angelina Vasileva <anikifor>
Component: ApplianceAssignee: Joe Rafaniello <jrafanie>
Status: CLOSED ERRATA QA Contact: Angelina Vasileva <anikifor>
Severity: medium Docs Contact: Red Hat CloudForms Documentation <cloudforms-docs>
Priority: medium    
Version: 5.10.0CC: abellott, dmetzger, jrafanie, obarenbo, simaishi
Target Milestone: GA   
Target Release: 5.11.0   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: 5.11.0.1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-12-12 13:34:53 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: CFME Core Target Upstream Version:
Embargoed:

Description Angelina Vasileva 2018-12-05 09:02:43 UTC
Description of problem:
Automate model and service dialogs are not collected during log collection for NFS and SMB types. However, they are collected for all other types: Anonymous FTP, FTP and Red Hat Dropbox. For NFS and SMB other logs are collected, only models and dialogs are missing.

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

How reproducible:
Always

Steps to Reproduce:
1. Have a log depot for log collection
2. Go to Configuration -> Diagnostics -> Server -> Collect Logs
3. Collect logs to NFS or Samba
4. Check collected logs

Actual results:
Archive_* and
Current_* logs are present.

Expected results:
Archive_* 
Current_* 
Dialogs_*
Models_* logs are present.

Additional info:
Models and dialogs in log collection were introduced here https://bugzilla.redhat.com/show_bug.cgi?id=1535179

Comment 2 Joe Rafaniello 2019-01-16 18:59:23 UTC
Upstream PR: https://github.com/ManageIQ/manageiq/pull/18365

Comment 3 Joe Rafaniello 2019-01-17 15:16:17 UTC
Upstream PR merged.  Commit message with details:


Previously, if you tried to collect logs from servers using an nfs
or smb depot, only the Archive***.zip and Current***.zip would be
uploaded.  Behind, the scenes, we were uploading the automate models and
dialogs as the same Archive***.zip so they'd overwrite each other.

In MiqServer#post_logs, it calls:
post_automate_models  => was using Archive***.zip
post_automate_dialogs => was using Archive***.zip
post_historical_logs  => was using Archive***.zip
post_current_logs     => uses Current***.zip

Therefore, the last Archive***.zip would "win", so the historical logs
would be in the Archive***.zip.

The nfs/smb code relies upon relative_path_for_upload to
determine a remote filename for upload. This method only knew about
archive and current logs and was giving everything but "Current" logs the
"Archive" filename prefix which meant dialogs/models and archived logs
would often have the same filename.

This method now uses the already known local file's name to determine this
prefix, allowing the input dialogs.zip, models.zip, current.zip, and
archive.zip to create unique names for this set of logs regardless of the
zone, server, or log timestamps.

Comment 5 Joe Rafaniello 2019-05-06 13:49:17 UTC
The "unknown" in the log archive name is our attempt at detecting the start and end of the log.  Because these aren't logs, there is no start or end log line.

We can leave out the unknown entirely if we don't find log lines if that's so desired.  Please open an RFE if that's desired.

Comment 6 Angelina Vasileva 2019-05-06 14:01:26 UTC
@Joe
I'm pointing to the difference. There's something going on as if logs are collected via FTP, there's no "unknown" part.

Comment 7 Joe Rafaniello 2019-05-06 14:47:50 UTC
Thanks, I misread the issue.  I'll open a BZ to fix that.

Comment 8 Joe Rafaniello 2019-05-06 14:50:07 UTC
For the purposes of this BZ, the issue has been resolved.  The naming differences with the "unknown" string in NFS but not on FTP dialogs/models will be fixed in a followup BZ.

Back to QA for confirmation.

Comment 9 Joe Rafaniello 2019-05-06 14:57:05 UTC
Opened bug #1706989 to fix the inconsistent naming of the Models/Dialogs.

Comment 10 Angelina Vasileva 2019-05-06 15:03:45 UTC
Verified for NFS and Samba in 5.11.0.2.20190430174828_0e34dea.
Automate model and service dialogs are collected during log collection.

The naming with the "unknown" string in NFS and Samba will be fixed in a followup BZ.

Comment 12 errata-xmlrpc 2019-12-12 13:34:53 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-2019:4199