Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1295419

Summary: foreman-debug -m=0 to collect all logs
Product: Red Hat Satellite Reporter: Pavel Moravec <pmoravec>
Component: Foreman DebugAssignee: Lukas Zapletal <lzap>
Status: CLOSED ERRATA QA Contact: Kedar Bidarkar <kbidarka>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.1.5CC: bbuckingham, kbidarka, sthirugn
Target Milestone: UnspecifiedKeywords: Improvement, Triaged
Target Release: Unused   
Hardware: All   
OS: Linux   
URL: http://projects.theforeman.org/issues/12978
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-07-27 09:01:07 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 2016-01-04 12:41:57 UTC
Description of problem:
foreman-debug should have an option to collect all logs. It already has option -m to limit number of lines per file collected, but -m0 means files are emtpy ("tail -n0" is called).

Please fix -m 0 to collect whole file, not its zero-length tail.


Version-Release number of selected component (if applicable):
foreman-debug-1.7.2.49-1.el7sat.noarch


How reproducible:
100%


Steps to Reproduce:
1. foreman-debug -m 0
2. unpack the generated archive
3. wc foreman-debug-*/var/log/katello-installer/katello-installer.log



Actual results:
3. shows empty logfile collected


Expected results:
the collected log file should be the same like original


Additional info:

Comment 2 Bryan Kearney 2016-01-07 09:04:11 UTC
Moving to POST since upstream bug http://projects.theforeman.org/issues/12978 has been closed
-------------
Pavel Moravec
Applied in changeset commit:51f005e139c09fdd37273ac408dc21a176431cda.

Comment 5 Kedar Bidarkar 2016-04-07 06:46:28 UTC
The collected log files are no longer empty.


oreman-installer]# ll
total 1512
-rw-r--r--. 1 root root    6782 Apr  7 02:38 capsule.log
-rw-r--r--. 1 root root    1212 Apr  7 02:38 foreman.log
-rw-r--r--. 1 root root 1523745 Apr  7 02:38 katello.1.log
-rw-r--r--. 1 root root    7400 Apr  7 02:38 katello.2.log
[root@katello1 foreman-installer]# pwd
/root/foreman-debug-7kzzK/var/log/foreman-installer


VERIFIED With sat62-snap6.0

Comment 7 errata-xmlrpc 2016-07-27 09:01:07 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:1500