file lock failure on tripleo_common.tests.utils.test_config.TestConfig.test_overcloud_config_one_config_type_StringException

Bug #1796745 reported by wes hayutin
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tripleo
Fix Released
Critical
Alex Schultz

Bug Description

ft1.10: tripleo_common.tests.utils.test_config.TestConfig.test_overcloud_config_one_config_type_StringException: Traceback (most recent call last):
  File "/home/zuul/src/git.openstack.org/openstack/tripleo-common/.tox/py36/lib/python3.6/site-packages/git/objects/commit.py", line 393, in create_from_tree
    repo.head.set_commit(new_commit, logmsg=message)
  File "/home/zuul/src/git.openstack.org/openstack/tripleo-common/.tox/py36/lib/python3.6/site-packages/git/refs/symbolic.py", line 235, in set_commit
    self.set_object(commit, logmsg)
  File "/home/zuul/src/git.openstack.org/openstack/tripleo-common/.tox/py36/lib/python3.6/site-packages/git/refs/symbolic.py", line 264, in set_object
    return self._get_reference().set_object(object, logmsg)
  File "/home/zuul/src/git.openstack.org/openstack/tripleo-common/.tox/py36/lib/python3.6/site-packages/git/refs/reference.py", line 60, in set_object
    oldbinsha = self.commit.binsha
  File "/home/zuul/src/git.openstack.org/openstack/tripleo-common/.tox/py36/lib/python3.6/site-packages/git/refs/symbolic.py", line 200, in _get_commit
    obj = self._get_object()
  File "/home/zuul/src/git.openstack.org/openstack/tripleo-common/.tox/py36/lib/python3.6/site-packages/git/refs/symbolic.py", line 193, in _get_object
    return Object.new_from_sha(self.repo, hex_to_bin(self.dereference_recursive(self.repo, self.path)))
  File "/home/zuul/src/git.openstack.org/openstack/tripleo-common/.tox/py36/lib/python3.6/site-packages/git/refs/symbolic.py", line 135, in dereference_recursive
    hexsha, ref_path = cls._get_ref_info(repo, ref_path)
  File "/home/zuul/src/git.openstack.org/openstack/tripleo-common/.tox/py36/lib/python3.6/site-packages/git/refs/symbolic.py", line 184, in _get_ref_info
    return cls._get_ref_info_helper(repo, ref_path)
  File "/home/zuul/src/git.openstack.org/openstack/tripleo-common/.tox/py36/lib/python3.6/site-packages/git/refs/symbolic.py", line 167, in _get_ref_info_helper
    raise ValueError("Reference at %r does not exist" % ref_path)
ValueError: Reference at 'refs/heads/master' does not exist

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/zuul/src/git.openstack.org/openstack/tripleo-common/.tox/py36/lib/python3.6/site-packages/gitdb/util.py", line 326, in open
    fd = os.open(self._lockfilepath(), lockmode, int("600", 8))
FileExistsError: [Errno 17] File exists: '/tmp/tht/.git/refs/heads/master.lock'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/zuul/src/git.openstack.org/openstack/tripleo-common/.tox/py36/lib/python3.6/site-packages/mock/mock.py", line 1305, in patched
    return func(*args, **keywargs)
  File "/home/zuul/src/git.openstack.org/openstack/tripleo-common/tripleo_common/tests/utils/test_config.py", line 92, in test_overcloud_config_one_config_type
    ['config_settings'])
  File "/home/zuul/src/git.openstack.org/openstack/tripleo-common/tripleo_common/utils/config.py", line 451, in download_config
    self.snapshot_config_dir(git_repo, commit_message)
  File "/home/zuul/src/git.openstack.org/openstack/tripleo-common/tripleo_common/utils/config.py", line 154, in snapshot_config_dir
    commit = repo.index.commit(commit_message)
  File "/home/zuul/src/git.openstack.org/openstack/tripleo-common/.tox/py36/lib/python3.6/site-packages/git/index/base.py", line 950, in commit
    author_date=author_date, commit_date=commit_date)
  File "/home/zuul/src/git.openstack.org/openstack/tripleo-common/.tox/py36/lib/python3.6/site-packages/git/objects/commit.py", line 397, in create_from_tree
    master = git.refs.Head.create(repo, repo.head.ref, new_commit, logmsg="commit (initial): %s" % message)
  File "/home/zuul/src/git.openstack.org/openstack/tripleo-common/.tox/py36/lib/python3.6/site-packages/git/refs/symbolic.py", line 546, in create
    return cls._create(repo, path, cls._resolve_ref_on_create, reference, force, logmsg)
  File "/home/zuul/src/git.openstack.org/openstack/tripleo-common/.tox/py36/lib/python3.6/site-packages/git/refs/symbolic.py", line 513, in _create
    ref.set_reference(target, logmsg)
  File "/home/zuul/src/git.openstack.org/openstack/tripleo-common/.tox/py36/lib/python3.6/site-packages/git/refs/symbolic.py", line 332, in set_reference
    fd = lfd.open(write=True, stream=True)
  File "/home/zuul/src/git.openstack.org/openstack/tripleo-common/.tox/py36/lib/python3.6/site-packages/gitdb/util.py", line 333, in open
    raise IOError("Lock at %r could not be obtained" % self._lockfilepath())
OSError: Lock at '/tmp/tht/.git/refs/heads/master.lock' could not be obtained

http://logs.openstack.org/07/608307/1/gate/openstack-tox-py36/c8387e8/testr_results.html.gz

Reset the gate

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tripleo-common (master)

Fix proposed to branch: master
Review: https://review.openstack.org/608774

Changed in tripleo:
assignee: nobody → Alex Schultz (alex-schultz)
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tripleo-common (master)

Reviewed: https://review.openstack.org/608774
Committed: https://git.openstack.org/cgit/openstack/tripleo-common/commit/?id=062f5e480f72113cba8c9f40ffb69412611aac96
Submitter: Zuul
Branch: master

commit 062f5e480f72113cba8c9f40ffb69412611aac96
Author: Alex Schultz <email address hidden>
Date: Mon Oct 8 15:11:31 2018 -0600

    Fix temp file locking issues in tests

    We were not properly mocking out the git initialization in the test so
    this could cause issues in CI when multiple threads attempt to use the
    same folder. This change mocks out the git initialization and adds
    coverage for the git initialization function.

    Change-Id: I5e6cd6cead12da8df8b366e4aa83d7c63d722369
    Closes-Bug: #1796745

Changed in tripleo:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tripleo-common (stable/rocky)

Fix proposed to branch: stable/rocky
Review: https://review.openstack.org/609722

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tripleo-common (stable/rocky)

Reviewed: https://review.openstack.org/609722
Committed: https://git.openstack.org/cgit/openstack/tripleo-common/commit/?id=99049c27f6425e3c215c37540ecccf2217cd9280
Submitter: Zuul
Branch: stable/rocky

commit 99049c27f6425e3c215c37540ecccf2217cd9280
Author: Alex Schultz <email address hidden>
Date: Mon Oct 8 15:11:31 2018 -0600

    Fix temp file locking issues in tests

    We were not properly mocking out the git initialization in the test so
    this could cause issues in CI when multiple threads attempt to use the
    same folder. This change mocks out the git initialization and adds
    coverage for the git initialization function.

    Change-Id: I5e6cd6cead12da8df8b366e4aa83d7c63d722369
    Closes-Bug: #1796745
    (cherry picked from commit 062f5e480f72113cba8c9f40ffb69412611aac96)

tags: added: in-stable-rocky
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/tripleo-common 10.1.0

This issue was fixed in the openstack/tripleo-common 10.1.0 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/tripleo-common 9.5.0

This issue was fixed in the openstack/tripleo-common 9.5.0 release.

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.