Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1411100 - [RFE] Change timestamp format to include timezone for logs
[RFE] Change timestamp format to include timezone for logs
Status: CLOSED CURRENTRELEASE
Product: otopi
Classification: oVirt
Component: General (Show other bugs)
master
Unspecified Unspecified
medium Severity medium (vote)
: ovirt-4.2.0
: 1.7.0
Assigned To: Yedidyah Bar David
samuel macko
: FutureFeature
Depends On:
Blocks: oVirt-Metrics-and-Logs
  Show dependency treegraph
 
Reported: 2017-01-08 07:00 EST by Shirly Radco
Modified: 2017-12-20 06:05 EST (History)
8 users (show)

See Also:
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
Story Points: ---
Clone Of:
Environment:
Last Closed: 2017-12-20 06:05:36 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: Integration
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
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)


External Trackers
Tracker ID Priority Status Summary Last Updated
oVirt gerrit 70025 master MERGED core: log: Add time zone to log records 2017-04-05 03:31 EDT

  None (edit)
Description Shirly Radco 2017-01-08 07:00:39 EST
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 04:18:11 EST
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 06:17:28 EST
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 10:18:08 EST
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 03:45:03 EDT
Copied doc text from bug 1408193 and edited.
Comment 6 samuel macko 2017-08-28 06:48:02 EDT
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 06:05:36 EST
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.