Description of problem:
Ramdisk log file have date set to 1/1/1970
Version-Release number of selected component (if applicable):
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>
tar write the warning "tar: journal: implausibly old time stamp 1970-01-01 02:00:00"
And journal file date is Jan 1 1970
File will have updated time stemp
Thanks for reporting. I think it's due to the fact we build the tarball in Python. I need to check the documentation.
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.
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?
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/
This bug did not make the OSP 8.0 release. It is being deferred to OSP 10.
Patch has been merged into upstream.
Removed unnecessary "the"s in doc text.
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.