Bug 1051658
Summary: | satellite-sync DST handling issue: "'NoneType' object is unsubscriptable" error on MST/PST Satellites with RHEL 6 Supplementary Channel RHBA-2013:1729-1 (erratum modified within 1hr before DST) | |||
---|---|---|---|---|
Product: | [Community] Spacewalk | Reporter: | Stephen Herr <sherr> | |
Component: | Server | Assignee: | Stephen Herr <sherr> | |
Status: | CLOSED CURRENTRELEASE | QA Contact: | Red Hat Satellite QA List <satqe-list> | |
Severity: | high | Docs Contact: | ||
Priority: | high | |||
Version: | 2.0 | CC: | alikins, ams-dev-list, bsaylor, dspaldin, jalviso, jbautist, jblashka, jhutar, mhuth, mmello, pgervase, rring, shughes, tdeanton, xdmoon, yjog | |
Target Milestone: | --- | Keywords: | Reopened | |
Target Release: | --- | |||
Hardware: | Unspecified | |||
OS: | Unspecified | |||
Whiteboard: | ||||
Fixed In Version: | spacewalk-backend-2.1.45-1 | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | ||
Clone Of: | 1038207 | |||
: | 1063340 (view as bug list) | Environment: | ||
Last Closed: | 2014-03-04 13:07:56 UTC | Type: | Bug | |
Regression: | --- | Mount Type: | --- | |
Documentation: | --- | CRM: | ||
Verified Versions: | Category: | --- | ||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | ||
Cloudforms Team: | --- | Target Upstream Version: | ||
Embargoed: | ||||
Bug Depends On: | 1038207 | |||
Bug Blocks: | 1063340, 1069560 |
Description
Stephen Herr
2014-01-10 19:42:43 UTC
Committing to Spacewalk master: 3143007bf42ca1f063cdb7a949b4a1b0157bd38f Switching MODIFIED Spacewalk bugs to ON_QA before 2.1 release. In bug 1057265 jhutar discovered a problem with sat-syncing from channel dumps that turned out to be due to this bug. Fixing: ce24ca518c0914b78b8884a1f5f854cb300b96ed *** Bug 1057265 has been marked as a duplicate of this bug. *** Spacewalk 2.1 has been released. https://fedorahosted.org/spacewalk/wiki/ReleaseNotes21 Spacewalk 2.1 has been released. https://fedorahosted.org/spacewalk/wiki/ReleaseNotes21 (In reply to Stephen Herr from comment #0) > I can't tell you why this only affects servers in Mountain or Pacific time. > I can't tell you what exactly is changing to make linux's mktime function > change its mind about what the timestamp should be. But this is the problem. I > think the fix should be to update the sat-sync code to only use pid to look up > package information, not pid and timestamp. I realized I never added an additional comment to clarify, so I'll do so now since this gets referenced every once in a while. The problem is with Daylight Savings Time and mktime. Mktime allows you to tell it if the given datetime is in DST or not. If you don't tell it, it figures it out based on the date / time. If it *can't* figure it out, because for example you are in the "fall back" hour that is repeated, then it *guesses* based on the *last* date / time that you passed to mktime. So which unix timestamp mktime returns for a given second in the fall-back hour is therefore non-deterministic. Sometimes it may assume the DST timestamp, sometimes the non-DST timestamp, based on whatever the last datetime it processed was. So somewhere in the process when we were processing a long list of datetimes it chose one and then later in the process it chose the other. And since the combination of pid and timestamp was required for the unique key, it couldn't find what it was looking for and eventually resulted in trying to subscript a None object. |