Bug 1289601

Summary: Task export in foreman-debug called from sosreport is malformed (gz truncated to 4999lines)
Product: Red Hat Satellite Reporter: Pavel Moravec <pmoravec>
Component: Foreman DebugAssignee: Lukas Zapletal <lzap>
Status: CLOSED DUPLICATE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 6.1.4CC: mlinden, pmoravec
Target Milestone: Unspecified   
Target Release: Unused   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-12-09 08:45:40 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Pavel Moravec 2015-12-08 14:23:20 UTC
Description of problem:
Running sosreport on Satellite, it calls foreman-debug that collects task-export. But:

1) Unpacking the sosreport, task-export tarball is malformed and cant be extracted. The cause is either foreman-debug or rather sosreport (dont have time to verify this now but blame foreman plugin in sos shortening the file length), so either tool shortens the file to 4999 lines.

2) It happened several times (on systems with many tasks although finished) that task export took extremely long, causing sosreport timeouted the command after 300seconds. Isn't it better to shorten possible time execution by shortening history of tasks to be collected? I.e. one week? That shouldnt impact investigation (much)..


Version-Release number of selected component (if applicable):
sos-3.2-35.el7.noarch
foreman-debug-1.7.2.46-1.el7sat.noarch


How reproducible:
100%


Steps to Reproduce:
1. sosreport -o foreman --batch
2. tar xJvf <sosreport_tarball> | grep task-export
3. tar xvf sosreport-*/sos_commands/foreman/foreman-debug/tmp/task-export-*.tar.gz
(replace the filename from the output from 2.)
4. wc tar xvf sosreport-*/sos_commands/foreman/foreman-debug/tmp/task-export-*.tar.gz

Actual results:
3. fails with "gzip: stdin: not in gzip format" error
4. shows something like:
   4999   34689 1646111 sosreport-pmoravec-sat61-rhel7.gsslab.brq.redhat.com-20151208150924/sos_commands/foreman/foreman-debug/tmp/task-export-1449583869.tar.gz


Expected results:


Additional info:

Comment 2 Lukas Zapletal 2015-12-08 15:32:52 UTC
Wasn't this already fixed in

http://projects.theforeman.org/issues/12346

https://bugzilla.redhat.com/show_bug.cgi?id=1274694

The BZ is pending 6.2 build. Can you confim the patch and then close this one please?

Comment 3 Pavel Moravec 2015-12-09 08:45:40 UTC
(In reply to Lukas Zapletal from comment #2)
> Wasn't this already fixed in
> 
> http://projects.theforeman.org/issues/12346
> 
> https://bugzilla.redhat.com/show_bug.cgi?id=1274694
> 
> The BZ is pending 6.2 build. Can you confim the patch and then close this
> one please?

Thanks and apologize I havent checked duplicate BZs. I am closing this as duplicate but will complain in the other as FailedQE (my testing found an issue)..

*** This bug has been marked as a duplicate of bug 1274694 ***