intermittent vmtests errors due to clock drift

Bug #1847138 reported by Chad Smith on 2019-10-07
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Chad Smith

Bug Description

The following unittest has a spurrious failure due to time drift between when timestamped files are created, and unit test validation tests/unittests/ TestCreateTar.test_create_log_tarfile_copies_configured_logs

This results in occasional jenkins CI failures like the following

We need to find a way to have to unit test either:
 1. mock the time when files are created to avoid mismatch when verifying
 2. allow unit test to verify allowing for a permissable time drift between creation and validation
 3. force the test to emit a known stable file name

12:25:03 FAIL: create_log_tarfile copies configured log_file and post_files.
12:25:03 ----------------------------------------------------------------------
12:25:03 Traceback (most recent call last):
12:25:03 File "/var/lib/jenkins/servers/server/workspace/curtin-ci/nodes/metal-s390x/curtin-3726/tests/unittests/", line 307, in test_create_log_tarfile_copies_configured_logs
12:25:03, self.tardir), self.m_copy.call_args_list)
12:25:03 AssertionError: call('/tmp/curtin-ci-TestCreateTar.EVBmg8/some.log', 'curtin-logs-2019-10-07-18-24') not found in [call('/tmp/curtin-ci-TestCreateTar.EVBmg8/some.log', 'curtin-logs-2019-10-07-18-25'),

Related branches

Ryan Harper (raharper) on 2019-10-07
Changed in curtin:
importance: Undecided → Medium
assignee: nobody → Chad Smith (chad.smith)

This bug is fixed with commit be563391 to curtin on branch master.
To view that commit see the following URL:

Changed in curtin:
status: New → Fix Committed

This bug is believed to be fixed in curtin in version 19.3. If this is still a problem for you, please make a comment and set the state back to New

Thank you.

Changed in curtin:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers