intermittent vmtests errors due to clock drift

Bug #1847138 reported by Chad Smith
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
curtin
Fix Released
Medium
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/test_commands_collect_logs.py: TestCreateTar.test_create_log_tarfile_copies_configured_logs

This results in occasional jenkins CI failures like the following https://jenkins.ubuntu.com/server/job/curtin-ci/3726/nodes=metal-s390x/consoleFull

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/test_commands_collect_logs.py", line 307, in test_create_log_tarfile_copies_configured_logs
12:25:03 mock.call(log1, 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)
Changed in curtin:
importance: Undecided → Medium
assignee: nobody → Chad Smith (chad.smith)
Revision history for this message
Server Team CI bot (server-team-bot) wrote :

This bug is fixed with commit be563391 to curtin on branch master.
To view that commit see the following URL:
https://git.launchpad.net/curtin/commit/?id=be563391

Changed in curtin:
status: New → Fix Committed
Revision history for this message
Ryan Harper (raharper) wrote : Fixed in curtin version 19.3.

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  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.