Bug 1323735 - ramdisk log file have old date
Summary: ramdisk log file have old date
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-ironic-inspector
Version: 8.0 (Liberty)
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: beta
: 10.0 (Newton)
Assignee: Miles Gould
QA Contact: Raviv Bar-Tal
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-04-04 14:34 UTC by Raviv Bar-Tal
Modified: 2016-12-14 15:29 UTC (History)
6 users (show)

Fixed In Version: openstack-ironic-inspector-3.3.1-0.20160607104948.457c127.el7ost
Doc Type: Bug Fix
Doc Text:
Previously, the modification dates were not being set on the IPA RAM disk logs when creating a tarfile. As a result, the introspection logs appeared to have the modification date of 1970-01-01, causing GNU tar to issue a warning when extracting the files. With this update, the modification dates are set correctly when creating a tarfile. The timestamps are now correct and GNU tar no longer issues the warning.
Clone Of:
Environment:
Last Closed: 2016-12-14 15:29:48 UTC


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2016:2948 normal SHIPPED_LIVE Red Hat OpenStack Platform 10 enhancement update 2016-12-14 19:55:27 UTC
OpenStack gerrit 301225 None None None 2016-06-21 20:14:51 UTC

Description Raviv Bar-Tal 2016-04-04 14:34:52 UTC
Description of problem:
Ramdisk log file have date set to 1/1/1970


Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.Set the parameter always_store_ramdisk_logs to true in the /etc/ironic-inspector/inspector.conf
2.Restart the inspector service
3.Import new node and run introspection
4.Open ramdisk log files from /var/log/ironic-inspector/ramdisk with the command tar xzf bmc_<filename>


Actual results:
tar write the warning  "tar: journal: implausibly old time stamp 1970-01-01 02:00:00"
And journal file date is Jan  1  1970

Expected results:
File will have updated time stemp

Additional info:

Comment 2 Dmitry Tantsur 2016-04-04 15:24:22 UTC
Thanks for reporting. I think it's due to the fact we build the tarball in Python. I need to check the documentation.

Comment 3 Miles Gould 2016-04-04 16:00:19 UTC
I think the code responsible is here: https://github.com/openstack/ironic-inspector/blob/master/ironic_inspector/plugins/standard.py#L346-L348 We're just writing out the data, and not setting any tar headers.

Comment 4 Miles Gould 2016-04-04 16:06:51 UTC
And the file's actually being created here: https://github.com/openstack/ironic-python-agent/blob/master/ironic_python_agent/inspector.py#L262 Is the system time being set correctly on the machine being introspected?

Comment 5 Miles Gould 2016-04-04 16:31:03 UTC
Looks like this is a well-known gotcha with Python's tarfile module: http://stackoverflow.com/questions/8648872/how-can-i-programmatically-create-a-tar-archive-of-nested-directories-and-files#comment10744694_8649029

Patch submitted to upstream here: https://review.openstack.org/#/c/301225/

Comment 6 Mike Burns 2016-04-07 21:36:02 UTC
This bug did not make the OSP 8.0 release.  It is being deferred to OSP 10.

Comment 7 Miles Gould 2016-04-08 13:57:43 UTC
Patch has been merged into upstream.

Comment 12 Miles Gould 2016-11-22 11:23:53 UTC
Removed unnecessary "the"s in doc text.

Comment 14 errata-xmlrpc 2016-12-14 15:29:48 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://rhn.redhat.com/errata/RHEA-2016-2948.html


Note You need to log in before you can comment on or make changes to this bug.