Project

General

Profile

Actions

Bug #17770

closed

foreman-debug does not preserve timestamps of log files

Added by Zach Huntington-Meath almost 8 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
foreman-debug
Target version:
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1365847
Description of problem:
The foreman plugin of sosreport does not preserve the timestamps of the log files.

Version-Release number of selected component (if applicable):
sos-3.2-35.el7_2.3

How reproducible:
Always

Steps to Reproduce:
1. Run sosreport with the foreman plugin enabled
2. Check the timestamps of the files at sos_commands/foreman/foreman-debug/var/log/tomcat
3.

Actual results:
$ ls gG
total 2260
-rw-r--r-
. 1 15379 Aug 5 08:46 catalina.2015-12-21.log
rw-r--r-. 1 15411 Aug 5 08:46 catalina.2015-12-22.log
rw-r--r-. 1 78313 Aug 5 08:46 catalina.2015-12-23.log
rw-r--r-. 1 47212 Aug 5 08:46 catalina.2015-12-24.log
rw-r--r-. 1 94245 Aug 5 08:46 catalina.2015-12-29.log
rw-r--r-. 1 15737 Aug 5 08:46 catalina.2015-12-31.log
rw-r--r-. 1 47163 Aug 5 08:46 catalina.2016-01-27.log
rw-r--r-. 1 62955 Aug 5 08:46 catalina.2016-01-28.log
rw-r--r-. 1 15690 Aug 5 08:46 catalina.2016-02-10.log
rw-r--r-. 1 56829 Aug 5 08:46 catalina.2016-02-16.log
rw-r--r-. 1 110275 Aug 5 08:46 catalina.2016-03-01.log
rw-r--r-. 1 31350 Aug 5 08:46 catalina.2016-03-03.log
rw-r--r-. 1 48059 Aug 5 08:46 catalina.2016-03-16.log
rw-r--r-. 1 47455 Aug 5 08:46 catalina.2016-04-06.log
rw-r--r-. 1 62993 Aug 5 08:46 catalina.2016-04-15.log
rw-r--r-. 1 293767 Aug 5 08:46 catalina.2016-04-19.log
rw-r--r-. 1 15683 Aug 5 08:46 catalina.2016-04-22.log
rw-r--r-. 1 78975 Aug 5 08:46 catalina.2016-04-25.log
rw-r--r-. 1 220029 Aug 5 08:46 catalina.2016-05-04.log
rw-r--r-. 1 15805 Aug 5 08:46 catalina.2016-05-10.log
rw-r--r-. 1 47093 Aug 5 08:46 catalina.2016-05-11.log
rw-r--r-. 1 126007 Aug 5 08:46 catalina.2016-05-17.log
rw-r--r-. 1 15738 Aug 5 08:46 catalina.2016-05-18.log
rw-r--r-. 1 31362 Aug 5 08:46 catalina.2016-05-26.log
rw-r--r-. 1 47180 Aug 5 08:46 catalina.2016-06-14.log
rw-r--r-. 1 49010 Aug 5 08:46 catalina.2016-07-08.log
rw-r--r-. 1 46999 Aug 5 08:46 catalina.2016-07-13.log
rw-r--r-. 1 15692 Aug 5 08:46 catalina.2016-07-14.log
rw-r--r-. 1 260007 Aug 5 08:46 catalina.2016-07-27.log
rw-r--r-. 1 40708 Aug 5 08:46 catalina.2016-07-28.log
rw-r--r-. 1 280 Aug 5 08:46 catalina.2016-07-29.log
rw-r--r-. 1 40206 Aug 5 08:46 catalina.2016-07-30.log
rw-r--r-. 1 60118 Aug 5 08:46 catalina.2016-08-02.log
rw-r--r-. 1 9712 Aug 5 08:46 catalina.2016-08-03.log
rw-r--r-. 1 10050 Aug 5 08:46 catalina.2016-08-04.log
rw-r--r-. 1 9676 Aug 5 08:46 catalina.2016-08-05.log

Expected results:
Timestamps of files collected by foreman plugin are preserved.

Additional info:

Actions #1

Updated by Dominic Cleal almost 8 years ago

  • Assignee deleted (Lukas Zapletal)
  • Priority changed from High to Normal
Actions #2

Updated by Anurag Patel over 7 years ago

Looks like foreman-debug doesn't actually copy the files/logs to its archive. It does a *cat on the files, filters strings and writes into the archive, thereby giving the target files new timestamp. It should be possible to use touch -r to copy the timestamps too.

Actions #3

Updated by The Foreman Bot over 7 years ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/theforeman/foreman/pull/4449 added
Actions #4

Updated by Anonymous over 7 years ago

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

Updated by Anurag Patel over 7 years ago

  • Status changed from Closed to Resolved
  • Assignee set to Anurag Patel

PR merged

Actions #6

Updated by Dominic Cleal over 7 years ago

  • Status changed from Resolved to Closed
Actions #7

Updated by Eric Helms about 7 years ago

  • Translation missing: en.field_release set to 276
Actions

Also available in: Atom PDF