chef icon indicating copy to clipboard operation
chef copied to clipboard

Timestamps are out of order in chef log

Open craigbookwalter opened this issue 12 years ago • 3 comments

Sometimes we see that timestamps are out of order in the chef log -- what's up with that?

[2014-09-30T20:29:32-04:00] INFO: Processing directory[c:\installs] action delete (core::cleanup line 3)
[2014-09-30T20:27:58-04:00] INFO: directory[c:\installs] deleted c:\installs recursively
[2014-09-30T20:27:58-04:00] INFO: Processing directory[c:\infrastructure] action delete (core::cleanup line 3)
[2014-09-30T20:28:12-04:00] INFO: directory[c:\infrastructure] deleted c:\infrastructure recursively
[2014-09-30T20:28:12-04:00] INFO: Processing file[c:\chef-client.msi] action delete (core::cleanup line 11)
[2014-09-30T20:28:12-04:00] INFO: Chef Run complete in 293.019919 seconds
[2014-09-30T20:28:12-04:00] INFO: Running report handlers
[2014-09-30T20:28:12-04:00] WARN: chef_handler[WindowsRebootHandler] no reboot requested or pending
[2014-09-30T20:28:12-04:00] INFO: Report handlers complete

craigbookwalter avatar Oct 01 '14 21:10 craigbookwalter

The client is just reporting the server time. The only way I can think of that this would happen is if you've got something like a cronjob which is running ntpdate or or something similar, and you've got a lot of skew that occurs between the cronjobs running due to running virtualized or something. The solution would be to properly run ntpd or to research why your virts were getting so much skew (old kernels and old virtualization software was particularly bad). So, this isn't a bug in chef-client, its faithfully reproducing the time on your server, and you've got a timekeeping issue somewhere.

lamont-granquist avatar Apr 29 '15 17:04 lamont-granquist

Without context of the environment, this is tough to replicate. In an Windows environment, the time service can effectively skew up to 5 minutes and still maintain it's proper security context in Active Directory. Time skews (and adjustments) are a pretty common occurrence and can be impacted by hypervisors as well.

usepowershell avatar Apr 29 '15 17:04 usepowershell

Yes, this was due to us improperly setting up the time zone in Windows. Sorry for the trouble!

On Wed, Apr 29, 2015 at 1:19 PM, Lamont Granquist [email protected] wrote:

The client is just reporting the server time. The only way I can think of that this would happen is if you've got something like a cronjob which is running ntpdate or or something similar, and you've got a lot of skew that occurs between the cronjobs running due to running virtualized or something. The solution would be to properly run ntpd or to research why your virts were getting so much skew (old kernels and old virtualization software was particularly bad). So, this isn't a bug in chef-client, its faithfully reproducing the time on your server, and you've got a timekeeping issue somewhere.

— Reply to this email directly or view it on GitHub https://github.com/chef/chef/issues/2147#issuecomment-97509815.

craigbookwalter avatar May 07 '15 14:05 craigbookwalter