Puppet: System Administration Automated

Support

Ticket #511 (assigned defect)

Opened 2 years ago

Last modified 9 months ago

checksum => timestamp hiccups on timezone change

Reported by: DavidS Assigned to: luke (accepted)
Priority: low Milestone:
Component: file Version: 0.22.1
Severity: trivial Keywords: file timestamp
Cc: Triage Stage: Accepted
Attached Patches: Code Complexity: Easy

Description

This happened a lot after changing the timezone from UTC to UTC+1:

notice: //.../File/usr/.../checksum: checksum changed '{time}Sun Feb 18 19:09:01 +0000 2007' to '{time}Sun Feb 18 20:09:01 +0100 2007'

Since TZ changes should not happen often, this is really a minor annoyance. I suppose, the error happens in lib/puppet/type/pfile/checksum.rb when doing mtime.to_s These conversions should probably all happen in UTC.

Attachments

fix-511.patch (1.8 kB) - added by DavidS on 09/27/07 10:02:26.
adds a test and always converts the timestamp to utc

Change History

04/19/07 22:47:25 changed by luke

  • status changed from new to assigned.
  • specification set to Unnecessary.
  • patch set to None.
  • complexity set to Easy.
  • approval set to Unnecessary.
  • compatibility set to Unknown.
  • stage set to Accepted.

09/27/07 10:02:26 changed by DavidS

  • attachment fix-511.patch added.

adds a test and always converts the timestamp to utc

09/27/07 10:07:03 changed by DavidS

  • patch changed from None to Code.

This patch fixes the original problem, but in doing so breaks backwards compatibility, because this will detect a non-existing change once for all files with mtime/time/timestamp checksums.

Fixing this without that breakage would require to enhance Checksum#insync?(currentvalue) to detect time formats and convert them to UTC internally. Then of course the test would have to be enhanced too.

04/24/08 06:51:58 changed by luke

  • component changed from types to file.