Project

General

Profile

Bug #17069

foreman-debug to collect whole newest (log)files instead of tailing all (log)files

Added by Pavel Moravec almost 3 years ago. Updated about 1 year ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Core
Target version:
Difficulty:
easy
Triaged:
Bugzilla link:
Fixed in Releases:
Found in Releases:

Description

(copied from http://projects.theforeman.org/issues/16680)

Description of problem:
Currently foreman-debug truncates any (log)file it collects after 5000 lines, to shrink the size of created tarball. This causes the problem that collected logs have "gaps" in timeline, what means we lose track of events happened that time.

Assume I want to investigate some problem with relevant logs scattered in past 2 days, and these logs are kept in files A.log, A.1.log and A.2.log, each exceeding 5k lines. Then I get tails of the logfiles (plus tails of A.9999.log from very past) but dont know what happened at the beginning of say A.1.log.

So we don't collect some log records in close history while we collect some logs in very past history.

What about to rather collect all newest files, until some per-directory limit is reached?

Something like that is done in sosreport [1] where it works well.

[1] https://github.com/sosreport/sos/blob/master/sos/plugins/__init__.py#L508‚Äč

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

How reproducible:
100%

Steps to Reproduce:
1. Generate logfiles (i.e. production.log*) each bigger than 5k lines
2. collect foreman-debug and unpack it
3. Check what logfiles are collected

Actual results:
Currently tails of all logfiles (even 2 years old, irrelevant for current problem investigation) are collected. But head of first log-rotated logfile is missing (causing we dont know what happened yesterday morning)

Expected results:
Collected logifles completely cover past few days without a gap; older logfiles not collected.

Additional info:
This issue is to reflect changes made in main foreman-debug and it's API - some calls in `foreman-debug-proxy` needs to be updated.


Related issues

Blocked by Foreman - Bug #17044: foreman-debug to collect whole newest (log)files instead of tailing all (log)filesClosed2016-09-24
Copied from Katello - Bug #16680: foreman-debug to collect whole newest (log)files instead of tailing all (log)filesClosed2016-09-24

Associated revisions

Revision 2cc33adc (diff)
Added by Pavel Moravec almost 3 years ago

Fixes #17069 - foreman-debug counts size instead lines

Update calling add_files (modified in foreman-debug).

Fixes #17069

Signed-off-by: Pavel Moravec <>

History

#1 Updated by Pavel Moravec almost 3 years ago

  • Copied from Bug #16680: foreman-debug to collect whole newest (log)files instead of tailing all (log)files added

#2 Updated by Dmitri Dolguikh almost 3 years ago

  • Category set to Core

#3 Updated by Dominic Cleal almost 3 years ago

  • Legacy Backlogs Release (now unused) deleted (188)
  • Pull request deleted (https://github.com/theforeman/foreman/pull/3881, https://github.com/Katello/katello-packaging/pull/297)

#4 Updated by Dominic Cleal almost 3 years ago

  • Blocked by Bug #17044: foreman-debug to collect whole newest (log)files instead of tailing all (log)files added

#5 Updated by Anonymous almost 3 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100

#6 Updated by Dominic Cleal almost 3 years ago

  • Legacy Backlogs Release (now unused) set to 189

Also available in: Atom PDF