tripleoclient unit tests fail intermitently at packaging (again)

Bug #1838506 reported by Javier Peña
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tripleo
Fix Released
High
Gael Chamoulaud

Bug Description

We are seeing the same symptoms from https://bugs.launchpad.net/bugs/1775577 again, now with the following stack trace:

==============================
Failed 1 tests - output below:
==============================
tripleoclient.tests.v1.overcloud_upgrade.test_overcloud_upgrade.TestOvercloudUpgradePrepare.test_upgrade_out
------------------------------------------------------------------------------------------------------------
Captured traceback:
~~~~~~~~~~~~~~~~~~~
    b'Traceback (most recent call last):'
    b' File "/usr/lib/python3.6/site-packages/mock/mock.py", line 1330, in patched'
    b' return func(*args, **keywargs)'
    b' File "/builddir/build/BUILD/python-tripleoclient-12.1.1.dev11/tripleoclient/tests/v1/overcloud_upgrade/test_overcloud_upgrade.py", line 85, in test_upgrade_out'
    b' self.cmd.take_action(parsed_args)'
    b' File "/builddir/build/BUILD/python-tripleoclient-12.1.1.dev11/tripleoclient/v1/overcloud_upgrade.py", line 74, in take_action'
    b' super(UpgradePrepare, self).take_action(parsed_args)'
    b' File "/builddir/build/BUILD/python-tripleoclient-12.1.1.dev11/tripleoclient/v1/overcloud_deploy.py", line 957, in take_action'
    b' self._deploy_tripleo_heat_templates_tmpdir(stack, parsed_args)'
    b' File "/builddir/build/BUILD/python-tripleoclient-12.1.1.dev11/tripleoclient/v1/overcloud_deploy.py", line 363, in _deploy_tripleo_heat_templates_tmpdir'
    b" tht_tmp = tempfile.mkdtemp(prefix='tripleoclient-')"
    b' File "/usr/lib64/python3.6/tempfile.py", line 360, in mkdtemp'
    b' prefix, suffix, dir, output_type = _sanitize_params(prefix, suffix, dir)'
    b' File "/usr/lib64/python3.6/tempfile.py", line 130, in _sanitize_params'
    b' dir = gettempdir()'
    b' File "/usr/lib64/python3.6/tempfile.py", line 298, in gettempdir'
    b' tempdir = _get_default_tempdir()'
    b' File "/usr/lib64/python3.6/tempfile.py", line 233, in _get_default_tempdir'
    b' dirlist)'
    b"FileNotFoundError: [Errno 2] No usable temporary directory found in ['/tmp', '/var/tmp', '/usr/tmp', '/builddir/build/BUILD/python-tripleoclient-12.1.1.dev11']"
    b''

This has started happening after https://review.opendev.org/670091 was merged, and is preventing downstream tripleoclient builds from succeeding.

Changed in tripleo:
milestone: none → train-3
status: New → Triaged
importance: Undecided → High
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-tripleoclient (master)

Fix proposed to branch: master
Review: https://review.opendev.org/673828

Changed in tripleo:
assignee: nobody → Gael Chamoulaud (gael-chamoulaud)
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-tripleoclient (master)

Reviewed: https://review.opendev.org/673828
Committed: https://git.openstack.org/cgit/openstack/python-tripleoclient/commit/?id=e1cb3042c8fe25d7fe28bc7d1d38f5a3ae90fa1d
Submitter: Zuul
Branch: master

commit e1cb3042c8fe25d7fe28bc7d1d38f5a3ae90fa1d
Author: Gael Chamoulaud <email address hidden>
Date: Wed Jul 31 16:06:28 2019 +0200

    Mock deployment action in upgrade tests

    Without properly mocking the deployment action, these tests are trying
    to execute deployment code including temp file creation which can lead
    to package build failures. This change mocks out the deployment take
    action for the UpgradeRun so we're only testing the upgrade code
    itself.

    Change-Id: I3ac295d2e2f86fbb2120f9491d4103434b6ac3da
    Closes-Bug: #1838506
    Signed-off-by: Gael Chamoulaud <email address hidden>

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

Fix proposed to branch: stable/stein
Review: https://review.opendev.org/673986

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-tripleoclient (stable/stein)

Reviewed: https://review.opendev.org/673986
Committed: https://git.openstack.org/cgit/openstack/python-tripleoclient/commit/?id=38070104592d6ad6e15a184df64bbb0d48858f25
Submitter: Zuul
Branch: stable/stein

commit 38070104592d6ad6e15a184df64bbb0d48858f25
Author: Gael Chamoulaud <email address hidden>
Date: Wed Jul 31 16:06:28 2019 +0200

    Mock deployment action in upgrade tests

    Without properly mocking the deployment action, these tests are trying
    to execute deployment code including temp file creation which can lead
    to package build failures. This change mocks out the deployment take
    action for the UpgradeRun so we're only testing the upgrade code
    itself.

    Change-Id: I3ac295d2e2f86fbb2120f9491d4103434b6ac3da
    Closes-Bug: #1838506
    Signed-off-by: Gael Chamoulaud <email address hidden>
    (cherry picked from commit e1cb3042c8fe25d7fe28bc7d1d38f5a3ae90fa1d)

tags: added: in-stable-stein
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/python-tripleoclient 11.5.1

This issue was fixed in the openstack/python-tripleoclient 11.5.1 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/python-tripleoclient 12.2.0

This issue was fixed in the openstack/python-tripleoclient 12.2.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.