Bug 1411100 - [RFE] Change timestamp format to include timezone for logs
Summary: [RFE] Change timestamp format to include timezone for logs
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: otopi
Classification: oVirt
Component: General
Version: master
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ovirt-4.2.0
: 1.7.0
Assignee: Yedidyah Bar David
QA Contact: samuel macko
URL:
Whiteboard:
Depends On:
Blocks: oVirt-Metrics-and-Logs
TreeView+ depends on / blocked
 
Reported: 2017-01-08 12:00 UTC by Shirly Radco
Modified: 2019-04-28 13:11 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
From now on, all timestamp records for otopi-based tools logs (including engine-setup, host-deploy, and hosted-engine --deploy) will contain a time zone to ease correlation between logs on the Manager and hosts. They will also now include the fraction of a second. Previously they contained a timestamp without a time zone and fraction of a second, for example: 2017-04-03 09:56:58 DEBUG otopi.context context.dumpEnvironment:760 ENVIRONMENT DUMP - BEGIN From now on there will always be a comma and fraction of a second after the seconds part, and a timezone identifier at the end of the timestamp part, for example: 2017-04-05 10:41:08,500+0300 DEBUG otopi.context context.dumpEnvironment:760 ENVIRONMENT DUMP - BEGIN
Clone Of:
Environment:
Last Closed: 2017-12-20 11:05:36 UTC
oVirt Team: Integration
rule-engine: ovirt-4.2+
ylavi: exception+
gklein: testing_plan_complete-
rule-engine: planning_ack+
rule-engine: devel_ack+
lsvaty: testing_ack+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 70025 0 master MERGED core: log: Add time zone to log records 2017-04-05 07:31:20 UTC

Description Shirly Radco 2017-01-08 12:00:39 UTC
Description of problem:
In order to be able to consume the logs from host deploy and engine-setup we need to add timezone to the local timestamp.

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

How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:
Logs include local timestamp without timezone

Expected results:
Logs include local timestamp with timezone

Additional info:

Comment 1 Doron Fediuck 2017-01-09 09:18:11 UTC
Shirly, you may have different hosts in different time zones for the same deployment. This means that you'll need to convert the time stamp you get.

The right way to handle it is by using UTC for all log files so the system
has a unified sense of time with no need for conversion.

Comment 2 Shirly Radco 2017-01-09 11:17:28 UTC
We plan to set the environment in utc. This is for next version.
But in order to consume the logs we MUST have the timestamp with timezone as well and then it can be consumed as UTC automatically.

Comment 3 Yedidyah Bar David 2017-01-25 15:18:08 UTC
After more work than most of us expected, the solution chosen for the engine [1] and vdsm [2] is to require and use python-dateutil.

otopi must be able to run (in host-deploy flow) on a minimal system, which likely does not have dateutil installed.

I intend to make it not fail if it's missing, but instead run 'date +%z' and use that. Will be a bit ugly.

Comment 5 Yedidyah Bar David 2017-04-05 07:45:03 UTC
Copied doc text from bug 1408193 and edited.

Comment 6 samuel macko 2017-08-28 10:48:02 UTC
Verified in ovirt version 4.2.0-0.0.master.20170827084901.git3fdb878.el7.centos

Tested with:
  ovirt-host-deploy-....log
  ovirt-engine-setup-....log

Comment 7 Sandro Bonazzola 2017-12-20 11:05:36 UTC
This bugzilla is included in oVirt 4.2.0 release, published on Dec 20th 2017.

Since the problem described in this bug report should be
resolved in oVirt 4.2.0 release, published on Dec 20th 2017, it has been closed with a resolution of CURRENT RELEASE.

If the solution does not work for you, please open a new bug report.


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