Bug #17770
closedforeman-debug does not preserve timestamps of log files
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. 1 15379 Aug 5 08:46 catalina.2015-12-21.log
total 2260
-rw-r--r-rw-r--r-. 1 15411 Aug 5 08:46 catalina.2015-12-22.logrw-r--r-. 1 78313 Aug 5 08:46 catalina.2015-12-23.logrw-r--r-. 1 47212 Aug 5 08:46 catalina.2015-12-24.logrw-r--r-. 1 94245 Aug 5 08:46 catalina.2015-12-29.logrw-r--r-. 1 15737 Aug 5 08:46 catalina.2015-12-31.logrw-r--r-. 1 47163 Aug 5 08:46 catalina.2016-01-27.logrw-r--r-. 1 62955 Aug 5 08:46 catalina.2016-01-28.logrw-r--r-. 1 15690 Aug 5 08:46 catalina.2016-02-10.logrw-r--r-. 1 56829 Aug 5 08:46 catalina.2016-02-16.logrw-r--r-. 1 110275 Aug 5 08:46 catalina.2016-03-01.logrw-r--r-. 1 31350 Aug 5 08:46 catalina.2016-03-03.logrw-r--r-. 1 48059 Aug 5 08:46 catalina.2016-03-16.logrw-r--r-. 1 47455 Aug 5 08:46 catalina.2016-04-06.logrw-r--r-. 1 62993 Aug 5 08:46 catalina.2016-04-15.logrw-r--r-. 1 293767 Aug 5 08:46 catalina.2016-04-19.logrw-r--r-. 1 15683 Aug 5 08:46 catalina.2016-04-22.logrw-r--r-. 1 78975 Aug 5 08:46 catalina.2016-04-25.logrw-r--r-. 1 220029 Aug 5 08:46 catalina.2016-05-04.logrw-r--r-. 1 15805 Aug 5 08:46 catalina.2016-05-10.logrw-r--r-. 1 47093 Aug 5 08:46 catalina.2016-05-11.logrw-r--r-. 1 126007 Aug 5 08:46 catalina.2016-05-17.logrw-r--r-. 1 15738 Aug 5 08:46 catalina.2016-05-18.logrw-r--r-. 1 31362 Aug 5 08:46 catalina.2016-05-26.logrw-r--r-. 1 47180 Aug 5 08:46 catalina.2016-06-14.logrw-r--r-. 1 49010 Aug 5 08:46 catalina.2016-07-08.logrw-r--r-. 1 46999 Aug 5 08:46 catalina.2016-07-13.logrw-r--r-. 1 15692 Aug 5 08:46 catalina.2016-07-14.logrw-r--r-. 1 260007 Aug 5 08:46 catalina.2016-07-27.logrw-r--r-. 1 40708 Aug 5 08:46 catalina.2016-07-28.logrw-r--r-. 1 280 Aug 5 08:46 catalina.2016-07-29.logrw-r--r-. 1 40206 Aug 5 08:46 catalina.2016-07-30.logrw-r--r-. 1 60118 Aug 5 08:46 catalina.2016-08-02.logrw-r--r-. 1 9712 Aug 5 08:46 catalina.2016-08-03.logrw-r--r-. 1 10050 Aug 5 08:46 catalina.2016-08-04.logrw-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:
Updated by Dominic Cleal almost 8 years ago
- Assignee deleted (
Lukas Zapletal) - Priority changed from High to Normal
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.
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
Updated by Anonymous over 7 years ago
- Status changed from Ready For Testing to Closed
- % Done changed from 0 to 100
Applied in changeset c0e6e3d686919cd0e33c3c8decc93dd39e5632e0.
Updated by Anurag Patel over 7 years ago
- Status changed from Closed to Resolved
- Assignee set to Anurag Patel
PR merged
Updated by Dominic Cleal over 7 years ago
- Status changed from Resolved to Closed
Updated by Eric Helms about 7 years ago
- Translation missing: en.field_release set to 276