Bug 1390867 - Switch log timestamp to UTC
Summary: Switch log timestamp to UTC
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: sanlock
Version: 27
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: David Teigland
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 1390674
TreeView+ depends on / blocked
 
Reported: 2016-11-02 07:13 UTC by Nir Soffer
Modified: 2018-11-30 17:50 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-11-30 17:50:09 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Nir Soffer 2016-11-02 07:13:12 UTC
Description of problem:

To make it easier to debug cluster issues, ovirt want to switch to UTC timestamps,
so timestamps in engine and vdsm logs match. To make this happen, we need also 
sanlock log timestamps in UTC format.

I think the best solution would be to provide a configuration option for UTC 
timestamps.

I guess we need to change /var/log/messages to UTC as well to debug sanlock
when using UTC timestamps.

The current way to get UTC timestamps in the logs is switch the system to UTC
timezone.

Comment 1 David Teigland 2016-11-02 14:24:23 UTC
I think just changing the logging timezone to utc is fine, I don't see any need to have it configurable.  When I replace localtime() with gmtime() I see this in /var/log/sanlock.log:

2016-11-02 08:02:16+0000 3186563 [27332]: sanlock daemon started 3.4.0 host null-02

and this in /var/log/messages:

Nov  2 03:02:16 null-02 sanlock[27332]: 2016-11-02 08:02:16+0000 3186563 [27332]: sanlock daemon started 3.4.0 host null-02

(do you think we can drop the %z / +0000 with this change?)

Comment 2 Nir Soffer 2016-11-05 19:24:29 UTC
(In reply to David Teigland from comment #1)
> I think just changing the logging timezone to utc is fine, I don't see any
> need to have it configurable.

The issue is using different timestamps when running with older vdsm using
localtime. The purpose of this bug is to allow vdsm to configure sanlock
so both use the same timestamps without affecting older vdsm versions when
a user upgrade sanlock.

> When I replace localtime() with gmtime() I
> see this in /var/log/sanlock.log:
> 
> 2016-11-02 08:02:16+0000 3186563 [27332]: sanlock daemon started 3.4.0 host
> null-02
> 
> and this in /var/log/messages:
> 
> Nov  2 03:02:16 null-02 sanlock[27332]: 2016-11-02 08:02:16+0000 3186563
> [27332]: sanlock daemon started 3.4.0 host null-02

Sending timestamps and pid to syslog does not look useful.

> (do you think we can drop the %z / +0000 with this change?)

Yes

Comment 3 Peter Portante 2016-11-09 04:00:14 UTC
Why are we not just setting the base system to be in UTC?

Comment 4 Nir Soffer 2017-01-13 13:30:45 UTC
(In reply to Peter Portante from comment #3)
> Why are we not just setting the base system to be in UTC?

I agree that this is the best solution, however upstream sanlock includes now 
the option to create utc timestamps in the logs:
https://git.fedorahosted.org/cgit/sanlock.git/commit/?id=fa70eff67e327b181e3d006a3381ae8e32822084

David, I think we can move this bug to modified.

Comment 5 David Teigland 2017-01-13 18:08:49 UTC
This is a fedora bug, so the bz state isn't very relevant, just closing instead.

Comment 6 Jan Kurik 2017-08-15 09:04:59 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 27 development cycle.
Changing version to '27'.

Comment 7 Ben Cotton 2018-11-27 18:30:53 UTC
This message is a reminder that Fedora 27 is nearing its end of life.
On 2018-Nov-30  Fedora will stop maintaining and issuing updates for
Fedora 27. It is Fedora's policy to close all bug reports from releases
that are no longer maintained. At that time this bug will be closed as
EOL if it remains open with a Fedora  'version' of '27'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 27 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 8 Ben Cotton 2018-11-30 17:50:09 UTC
Fedora 27 changed to end-of-life (EOL) status on 2018-11-30. Fedora 27 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.


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