Merge lp:~jtv/maas/bug-1354511 into lp:~maas-committers/maas/trunk
Status: | Merged |
---|---|
Approved by: | Jeroen T. Vermeulen |
Approved revision: | no longer in the source branch. |
Merged at revision: | 2668 |
Proposed branch: | lp:~jtv/maas/bug-1354511 |
Merge into: | lp:~maas-committers/maas/trunk |
Diff against target: |
162 lines (+76/-21) 2 files modified
src/maasserver/api.py (+28/-9) src/maasserver/tests/test_api_commissioning.py (+48/-12) |
To merge this branch: | bzr merge lp:~jtv/maas/bug-1354511 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Blake Rouse (community) | Approve | ||
Review via email: mp+230160@code.launchpad.net |
Commit message
When timing out nodes that haven't finished commissioning, compare the last-update timestamp to the database clock (from which it was also generated), not to the Python-side clock. Timezone skew between the two could cause nodes to time out immediately, or hours late.
Description of the change
The timezone skew was causing test failures for me (and, I gather, for Julian as well) as a result of recent travel. A database cluster set up while in one time zone might break tests run in another. The new test simulates this situation, and reproduces the problem, as long as your timezone offset from UTC is less than 12 hours.
I intend to backport this fix to the currently maintained versions; I believe those are at least 1.2 (in 12.04 LTS), 1.5 (in 14.04 LTS), and 1.6 (for 14.10).
Jeroen
Looks good. No blockers, just two comments. Comments inline.