Bug 1370224

Summary: foreman-debug does not properly collect foreman-tasks export
Product: Red Hat Satellite Reporter: Mike McCune <mmccune>
Component: Foreman DebugAssignee: Chris Roberts <chrobert>
Status: CLOSED ERRATA QA Contact: jcallaha
Severity: high Docs Contact:
Priority: high    
Version: 6.2.0CC: bbuckingham, bkearney, brubisch, chrobert, ehelms, jcallaha
Target Milestone: UnspecifiedKeywords: Regression, Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
URL: http://projects.theforeman.org/issues/13363
Whiteboard:
Fixed In Version: katello-3.0.0-12 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-09-14 21:02:06 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 Mike McCune 2016-08-25 15:02:15 UTC
Running foreman-debug only seems to generate a txt file, not a proper tar.gz:

foreman-debug-vdR0C/tmp
task-export-1471875887.tar.gz.txt

contents of the txt file seems to be a flat export of a single task vs the entire set:

      - id: 8ac4888a4eba3bdc014eba4489450015
        contentId: '1437644130372'
        enabled: 
        created: '2015-07-23T09:35:30.629+0000'
        updated: '2015-07-23T09:35:30.629+0000'
      - id: 8ac4888a5004bcbc01501395c3002e5c

Comment 2 Chris Roberts 2016-08-26 16:12:11 UTC
Works on nightly and 3.1

Nightly
https://paste.fedoraproject.org/414433/27750147/

3.1
https://paste.fedoraproject.org/414391/22243221/

Working on getting it brought downstream

Comment 3 Chris Roberts 2016-08-26 16:38:31 UTC
Fixed in 

https://github.com/Katello/katello-packaging/pull/150

Comment 5 jcallaha 2016-09-01 18:34:19 UTC
Verified in Satellite 6.2.2.

[root@rhsm-qe-1 unpack]# tar -xf foreman-debug-4od3l.tar.xz

[root@rhsm-qe-1 unpack]# cd foreman-debug-4od3l

[root@rhsm-qe-1 foreman-debug-4od3l]# ll
total 1332
-rw-r--r--.  1 root root    271 Sep  1 14:20 bundle_list
-rw-r--r--.  1 root root  11326 Sep  1 14:20 cpuinfo
-rw-r--r--.  1 root root     44 Sep  1 14:20 date
drwxr-xr-x. 17 root root   4096 Sep  1 14:20 etc
-rw-r--r--.  1 root root   5504 Sep  1 14:20 facts
-rw-r--r--.  1 root root    605 Sep  1 14:20 foreman_auth_table
-rw-r--r--.  1 root root   2252 Sep  1 14:20 foreman_filecontexts
-rw-r--r--.  1 root root   1908 Sep  1 14:20 foreman_packages
-rw-r--r--.  1 root root   9255 Sep  1 14:20 foreman_settings_table
-rw-r--r--.  1 root root    798 Sep  1 14:20 gem_list
-rw-r--r--.  1 root root   3386 Sep  1 14:20 gem_list_scl
-rw-r--r--.  1 root root    232 Sep  1 14:20 hosts
-rw-r--r--.  1 root root   2469 Sep  1 14:20 ifconfig
-rw-r--r--.  1 root root  37362 Sep  1 14:20 installed_packages
-rw-r--r--.  1 root root   1579 Sep  1 14:20 ip_a
-rw-r--r--.  1 root root    300 Sep  1 14:20 ip_r
-rw-r--r--.  1 root root   9939 Sep  1 14:20 iptables
-rw-r--r--.  1 root root  17447 Sep  1 14:20 katello_pki_dir
-rw-r--r--.  1 root root  14569 Sep  1 14:20 katello_ssl_build_dir
-rw-r--r--.  1 root root     90 Sep  1 14:20 lsb_release
-rw-r--r--.  1 root root   4745 Sep  1 14:20 lsmod
-rw-r--r--.  1 root root   1254 Sep  1 14:20 meminfo
-rw-r--r--.  1 root root    149 Sep  1 14:20 mongo-reserved_resources
-rw-r--r--.  1 root root  99624 Sep  1 14:20 mongo-task_status
-rw-r--r--.  1 root root  34217 Sep  1 14:20 netstat
-rw-r--r--.  1 root root    408 Sep  1 14:20 ping_hostname
-rw-r--r--.  1 root root    408 Sep  1 14:20 ping_hostname_full
-rw-r--r--.  1 root root    296 Sep  1 14:20 ping_localhost
-rw-r--r--.  1 root root   2156 Sep  1 14:20 plugin_list
-rw-r--r--.  1 root root  40742 Sep  1 14:20 process_list
-rw-r--r--.  1 root root  31806 Sep  1 14:20 ps-awfux
-rw-r--r--.  1 root root  81845 Sep  1 14:20 ps-elfm
-rw-r--r--.  1 root root    116 Sep  1 14:20 pulp-running_tasks
-rw-r--r--.  1 root root    112 Sep  1 14:20 puppet_manifests_tree
-rw-r--r--.  1 root root    792 Sep  1 14:20 qpid-rpm-qa
-rw-r--r--.  1 root root   5842 Sep  1 14:20 qpid-stat-c
-rw-r--r--.  1 root root  10929 Sep  1 14:20 qpid-stat-q
-rw-r--r--.  1 root root  10929 Sep  1 14:20 qpid_stat_queues
-rw-r--r--.  1 root root   1566 Sep  1 14:20 qpid-stat-resource_manager
-rw-r--r--.  1 root root  16160 Sep  1 14:20 qpid_stat_subscriptions
-rw-r--r--.  1 root root  16160 Sep  1 14:20 qpid-stat-u
-rw-r--r--.  1 root root    438 Sep  1 14:20 route
-rw-r--r--.  1 root root     76 Sep  1 14:20 selinux_audit2allow
-rw-r--r--.  1 root root  24428 Sep  1 14:20 selinux_booleans
-rw-r--r--.  1 root root   5054 Sep  1 14:20 selinux_denials.log
-rw-r--r--.  1 root root 637220 Sep  1 14:20 selinux_fcontext
-rw-r--r--.  1 root root   5031 Sep  1 14:20 selinux_first_denials.log
-rw-r--r--.  1 root root   5993 Sep  1 14:20 selinux_modules
-rw-r--r--.  1 root root     76 Sep  1 14:20 skipped_files
-rw-r--r--.  1 root root     46 Sep  1 14:20 software_collections
-rw-r--r--.  1 root root  46036 Sep  1 14:20 ss
-rw-r--r--.  1 root root   1330 Sep  1 14:20 tftpboot_tree
drwxr-xr-x.  2 root root     77 Sep  1 14:20 tmp
-rw-r--r--.  1 root root    714 Sep  1 14:20 ulimit
-rw-r--r--.  1 root root    151 Sep  1 14:20 uname
drwxr-xr-x.  3 root root     18 Sep  1 14:20 usr
drwxr-xr-x.  5 root root     38 Sep  1 14:20 var
-rw-r--r--.  1 root root     33 Sep  1 14:20 version_puppet
-rw-r--r--.  1 root root     68 Sep  1 14:20 version_ruby
-rw-r--r--.  1 root root    119 Sep  1 14:20 virsh_list

[root@rhsm-qe-1 foreman-debug-4od3l]# cd tmp/

[root@rhsm-qe-1 tmp]# ll
total 136
-rw-r--r--. 1 root root 134362 Sep  1 14:20 task-export-1472754045.tar.gz
-rw-r--r--. 1 root root    139 Sep  1 14:20 tasks_export.log

[root@rhsm-qe-1 tmp]# tar -xf task-export-1472754045.tar.gz 

[root@rhsm-qe-1 tmp]# ll tmp/task-export20160901-15094-1lrwg6f/
total 620
-rw-rw-r--. 1 foreman foreman  17006 Sep  1 14:20 254ee1e9-ea29-4464-98a1-26c6bbf07d92.html
-rw-rw-r--. 1 foreman foreman   3180 Sep  1 14:20 27f17042-8f7e-4ad4-a43d-77bf75dd1127.html
-rw-r--r--. 1 foreman foreman   1603 Sep  1 14:20 application.css
-rw-r--r--. 1 foreman foreman    729 Sep  1 14:20 application.js
-rwxr-xr-x. 1 foreman foreman 141796 Sep  1 14:20 bootstrap.css
-rwxr-xr-x. 1 foreman foreman  66924 Sep  1 14:20 bootstrap.js
-rw-rw-r--. 1 foreman foreman  88439 Sep  1 14:20 d580ec23-e881-4411-8950-b99beb8dff60.html
-rw-rw-r--. 1 foreman foreman   1058 Sep  1 14:20 index.html
-rw-r--r--. 1 foreman foreman 274080 Sep  1 14:20 jquery.js
-rw-r--r--. 1 foreman foreman  16682 Sep  1 14:20 run_prettify.js

Comment 8 errata-xmlrpc 2016-09-14 21:02:06 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-2016:1885