unit test race condition in tests/unittests/test_commands_collect_logs.py

Bug #1772481 reported by Scott Moser
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
curtin
Fix Released
Low
Chad Smith

Bug Description

a small window... but
 https://jenkins.ubuntu.com/server/job/curtin-ci/nodes=metal-s390x/946/console

that failed like below. The reason for the failure I believe is that a minute turned over between the utcnow() usage in line 97:
          date = datetime.datetime.utcnow().strftime('%Y-%m-%d-%H-%M')

and the utcnow() usage in create_log_tarfile.

trusty-py3 create: /var/lib/jenkins/slaves/s390x/workspace/curtin-ci/nodes/metal-s390x/curtin-946/.tox/trusty-py3
trusty-py3 installdeps: pyflakes==0.8.1, pep8==1.4.6, mock==1.0.1, nose==1.3.1, pyyaml==3.10, oauthlib==0.6.1
trusty-py3 develop-inst: /var/lib/jenkins/slaves/s390x/workspace/curtin-ci/nodes/metal-s390x/curtin-946
trusty-py3 installed: -e git+https://git.launchpad.net/~smoser/curtin@1273f99d90b1a2c7d6611480790fa4725b50f4e5#egg=curtin,mock==1.0.1,nose==1.3.1,oauthlib==0.6.1,pep8==1.4.6,pyflakes==0.8.1,PyYAML==3.10
trusty-py3 runtests: PYTHONHASHSEED='2879760357'
trusty-py3 runtests: commands[0] | /var/lib/jenkins/slaves/s390x/workspace/curtin-ci/nodes/metal-s390x/curtin-946/.tox/trusty-py3/bin/python /var/lib/jenkins/slaves/s390x/workspace/curtin-ci/nodes/metal-s390x/curtin-946/tools/noproxy nosetests tests/unittests
.....................................................................................................................................................................................................................................................................................................................................................E........................................................................................................................................................................................................SS...............................................................
======================================================================
ERROR: collect_logs_main sources all configs from /curtin/configs dir.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/var/lib/jenkins/slaves/s390x/workspace/curtin-ci/nodes/metal-s390x/curtin-946/tests/unittests/test_commands_collect_logs.py", line 116, in test_collect_logs_main_sources_config_from_pack_configs
    with open(curtin_config, 'r') as f:
FileNotFoundError: [Errno 2] No such file or directory: '/tmp/curtin-ci-TestCollectLogs.ashtev0y/mytemp/curtin-logs-2018-05-21-16-26/curtin-config'

----------------------------------------------------------------------
Ran 607 tests in 3.100s

Related branches

Chad Smith (chad.smith)
Changed in curtin:
status: New → In Progress
importance: Undecided → Low
assignee: nobody → Chad Smith (chad.smith)
Revision history for this message
Chad Smith (chad.smith) wrote :

An upstream commit landed for this bug.

To view that commit see the following URL:
https://git.launchpad.net/curtin/commit/?id=f1c31e55

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

This bug is believed to be fixed in curtin in version 18.2. 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.