Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1411100

Summary: [RFE] Change timestamp format to include timezone for logs
Product: [oVirt] otopi Reporter: Shirly Radco <sradco>
Component: GeneralAssignee: Yedidyah Bar David <didi>
Status: CLOSED CURRENTRELEASE QA Contact: samuel macko <smacko>
Severity: medium Docs Contact:
Priority: medium    
Version: masterCC: bugs, dfediuck, lsvaty, oourfali, sradco, trichard, ylavi
Target Milestone: ovirt-4.2.0Keywords: FutureFeature
Target Release: 1.7.0Flags: rule-engine: ovirt-4.2+
ylavi: exception+
gklein: testing_plan_complete-
rule-engine: planning_ack+
rule-engine: devel_ack+
lsvaty: testing_ack+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
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 11:05:36 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Integration RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1402901    

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.