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

Bug 1561927

Summary: engine.log - timezone handling broken for utc
Product: [oVirt] ovirt-engine-metrics Reporter: Shirly Radco <sradco>
Component: GenericAssignee: Shirly Radco <sradco>
Status: CLOSED CURRENTRELEASE QA Contact: Lukas Svaty <lsvaty>
Severity: high Docs Contact:
Priority: high    
Version: 1.0.0CC: bugs, lsvaty, lveyde, mperina
Target Milestone: ovirt-4.2.3Keywords: Reopened
Target Release: ---Flags: rule-engine: ovirt-4.2+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: ovirt-engine-metrics-1.1.4-1.el7ev Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-05-10 06:28:46 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Metrics RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Shirly Radco 2018-03-29 08:12:43 UTC
Description of problem:
Timestamp  is missing timezone in the engine.log instead there is "Z", this means fluentd is unable to parse the log messages.

Version-Release number of selected component (if applicable):
4.2.2.4-0.1.el7

How reproducible:


Steps to Reproduce:
1.Have ovirt engine in utc
2.Check engine.log timestamp
3.

Actual results:
Timestamp example:
2018-03-29 06:53:33,581Z INFO ...

Expected results:
2018-03-29 06:53:33,581+00 INFO ...

Additional info:

Comment 1 Martin Perina 2018-03-29 08:44:22 UTC
Nothing is broken, engine logs comply with ISO 8601 [1] standard, where Z is correct identification for UTC time zone.

We are using "X" [2] to identify that we want logs with ISO 8601 time zone, there's no option how to control that "+00:00" is used instead of "Z". And what's even more important "Z" is preferred over "+00:00" to identify UTC time zone.

[1] https://en.wikipedia.org/wiki/ISO_8601#Coordinated_Universal_Time_(UTC)
[2] file:///home/mperina/Documents/api-1.8.0/index.html

Comment 2 Martin Perina 2018-03-29 09:06:50 UTC
(In reply to Martin Perina from comment #1)
> Nothing is broken, engine logs comply with ISO 8601 [1] standard, where Z is
> correct identification for UTC time zone.
> 
> We are using "X" [2] to identify that we want logs with ISO 8601 time zone,
> there's no option how to control that "+00:00" is used instead of "Z". And
> what's even more important "Z" is preferred over "+00:00" to identify UTC
> time zone.
> 
> [1] https://en.wikipedia.org/wiki/ISO_8601#Coordinated_Universal_Time_(UTC)
> [2] file:///home/mperina/Documents/api-1.8.0/index.html

Sorry here's correct public link:

[2] https://docs.oracle.com/javase/8/docs/api/java/text/SimpleDateFormat.html

Comment 3 Lukas Svaty 2018-03-29 09:50:00 UTC
Reopenning on metrics, where we need to support this format from the fluentd side.

Comment 4 Lukas Svaty 2018-04-19 13:44:36 UTC
verified in ovirt-engine-metrics-1.1.4-1.el7ev.noarch
Timestamp type: 2018-04-19 13:43:44,043Z

Comment 5 Sandro Bonazzola 2018-05-10 06:28:46 UTC
This bugzilla is included in oVirt 4.2.3 release, published on May 4th 2018.

Since the problem described in this bug report should be
resolved in oVirt 4.2.3 release, it has been closed with a resolution of CURRENT RELEASE.

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