Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use atexit to cleanup tmp dirs #56532

Open
wants to merge 6 commits into
base: devel
from

Conversation

Projects
None yet
5 participants
@samdoran
Copy link
Member

commented May 16, 2019

SUMMARY

Fixes #56488
Related to #56144

When a config setting of type tmp, tmpdir, or tempdir was encountered, it created a temporary directory in addition to the default one. Only the default temporary directory was cleaned up, leaving an empty one behind. This PR uses atexit() to register and remove all temporary directories created by config.

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

lib/ansible/config/manager.py
lib/ansible/cli/config.py

Show resolved Hide resolved lib/ansible/utils/path.py Outdated

@samdoran samdoran requested review from bcoca and sivel May 16, 2019

Show resolved Hide resolved lib/ansible/config/manager.py Outdated
Show resolved Hide resolved lib/ansible/utils/path.py Outdated
Show resolved Hide resolved lib/ansible/utils/path.py Outdated
Show resolved Hide resolved lib/ansible/utils/path.py Outdated

@samdoran samdoran removed the needs_triage label May 21, 2019

@samdoran samdoran force-pushed the samdoran:issue/56488-config-temp-dirs branch from 84a6540 to 7fd5888 May 21, 2019

@samdoran samdoran force-pushed the samdoran:issue/56488-config-temp-dirs branch from 7fd5888 to fa58437 May 21, 2019

@samdoran samdoran changed the title [WIP] Use atexit to cleanup tmp dirs Use atexit to cleanup tmp dirs May 24, 2019

@ansibot ansibot added core_review and removed WIP labels May 24, 2019

Show resolved Hide resolved lib/ansible/utils/path.py Outdated
@ansibot

This comment was marked as resolved.

Copy link
Contributor

commented May 31, 2019

The test ansible-test sanity --test pylint [explain] failed with 2 errors:

lib/ansible/utils/path.py:126:57: multiple-statements More than one statement on a single line
lib/ansible/utils/path.py:128:61: multiple-statements More than one statement on a single line

The test ansible-test sanity --test pep8 [explain] failed with 2 errors:

lib/ansible/utils/path.py:126:56: E701 multiple statements on one line (colon)
lib/ansible/utils/path.py:128:60: E701 multiple statements on one line (colon)

click here for bot help

@ansibot ansibot added the ci_verified label May 31, 2019

@samdoran samdoran force-pushed the samdoran:issue/56488-config-temp-dirs branch from d2a75ac to 45511d3 May 31, 2019

@ansibot ansibot added the stale_ci label Jun 12, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.