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

Lots of empty directories left in /tmp #397

Closed
opoplawski opened this issue Oct 19, 2018 · 4 comments
Closed

Lots of empty directories left in /tmp #397

opoplawski opened this issue Oct 19, 2018 · 4 comments

Comments

@opoplawski
Copy link

@opoplawski opoplawski commented Oct 19, 2018

ansible 2.7.0
mitogen git ad44ad1 (Oct 3)
Scientific Linux 7.5

After running I end up with lots of empty directories left in tmp:

# ls /tmp
ansible_mitogen_action_00d7fa93f3318247/
ansible_mitogen_action_022c07affc309838/
ansible_mitogen_action_04051aa8ca3426fd/
ansible_mitogen_action_0466508584120711/
ansible_mitogen_action_096ed9293d5e3dfd/
ansible_mitogen_action_09e4c74ad9a2b697/
ansible_mitogen_action_0ca8f3c04161db42/
....
@opoplawski
Copy link
Author

@opoplawski opoplawski commented Oct 19, 2018

Perhaps a side effect of using:

remote_tmp     = /tmp

?

@opoplawski
Copy link
Author

@opoplawski opoplawski commented Oct 19, 2018

Nope, without it I get lots in /root/.ansible/tmp, including a:

ansible-local-1513usmJRK/
@dw
Copy link
Member

@dw dw commented Oct 23, 2018

This is a regression with the new temp file handling code for 2.7, should hopefully have a fix today (yay, finally a free day to look at this stuff :) )

@dw
Copy link
Member

@dw dw commented Oct 23, 2018

The problem was due to removing duplicate data appearing in multiple places. I forgot that the default Ansible behaviour is to reset that "shell.tmpdir" behaviour after remove is called. Fixed and test added for it.

Thanks a ton for reporting this! Hopefully will have an interim 0.2.4 release out perhaps by end of day.

@dw dw closed this in 1b17aa1 Oct 23, 2018
dw added a commit that referenced this issue Oct 23, 2018
Newer Ansibles use atexit.register() to invoke cleanup, so we need to
run those registrations after each run.
dw added a commit that referenced this issue Dec 13, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants