ansible / awx

AWX provides a web-based user interface, REST API, and task engine built on top of Ansible. It is one of the upstream projects for Red Hat Ansible Automation Platform.
Other
13.7k stars 3.38k forks source link

Permission denied error on importer.py after play is done #6907

Open stokkie90 opened 4 years ago

stokkie90 commented 4 years ago
ISSUE TYPE
SUMMARY

After running a job in AWX there is an error appearing in importer.py Not sure what is causing it.

ENVIRONMENT
STEPS TO REPRODUCE

Run a job and wait to finish it

EXPECTED RESULTS

No Error

ACTUAL RESULTS
awx-ddfcd87cf-j5h6s awx-task 2020-04-29 11:56:03,429 ERROR    awx.main.tasks job 65882 (running) Exception occurred while running task
awx-ddfcd87cf-j5h6s awx-task Traceback (most recent call last):
awx-ddfcd87cf-j5h6s awx-task   File "/var/lib/awx/venv/awx/lib/python3.6/site-packages/awx/main/tasks.py", line 1481, in run
awx-ddfcd87cf-j5h6s awx-task     res = ansible_runner.interface.run(**params)
awx-ddfcd87cf-j5h6s awx-task   File "/var/lib/awx/venv/awx/lib/python3.6/site-packages/ansible_runner/interface.py", line 178, in run
awx-ddfcd87cf-j5h6s awx-task     r.run()
awx-ddfcd87cf-j5h6s awx-task   File "/var/lib/awx/venv/awx/lib/python3.6/site-packages/ansible_runner/runner.py", line 265, in run
awx-ddfcd87cf-j5h6s awx-task     _delete()
awx-ddfcd87cf-j5h6s awx-task   File "/var/lib/awx/venv/awx/lib/python3.6/site-packages/ansible_runner/runner.py", line 256, in _delete
awx-ddfcd87cf-j5h6s awx-task     shutil.rmtree(self.config.process_isolation_path_actual)
awx-ddfcd87cf-j5h6s awx-task   File "/var/lib/awx/venv/awx/lib64/python3.6/shutil.py", line 486, in rmtree
awx-ddfcd87cf-j5h6s awx-task     _rmtree_safe_fd(fd, path, onerror)
awx-ddfcd87cf-j5h6s awx-task   File "/var/lib/awx/venv/awx/lib64/python3.6/shutil.py", line 424, in _rmtree_safe_fd
awx-ddfcd87cf-j5h6s awx-task     _rmtree_safe_fd(dirfd, fullname, onerror)
awx-ddfcd87cf-j5h6s awx-task   File "/var/lib/awx/venv/awx/lib64/python3.6/shutil.py", line 424, in _rmtree_safe_fd
awx-ddfcd87cf-j5h6s awx-task     _rmtree_safe_fd(dirfd, fullname, onerror)
awx-ddfcd87cf-j5h6s awx-task   File "/var/lib/awx/venv/awx/lib64/python3.6/shutil.py", line 424, in _rmtree_safe_fd
awx-ddfcd87cf-j5h6s awx-task     _rmtree_safe_fd(dirfd, fullname, onerror)
awx-ddfcd87cf-j5h6s awx-task   [Previous line repeated 1 more time]
awx-ddfcd87cf-j5h6s awx-task   File "/var/lib/awx/venv/awx/lib64/python3.6/shutil.py", line 444, in _rmtree_safe_fd
awx-ddfcd87cf-j5h6s awx-task     onerror(os.unlink, fullname, sys.exc_info())
awx-ddfcd87cf-j5h6s awx-task   File "/var/lib/awx/venv/awx/lib64/python3.6/shutil.py", line 442, in _rmtree_safe_fd
awx-ddfcd87cf-j5h6s awx-task     os.unlink(name, dir_fd=topfd)
awx-ddfcd87cf-j5h6s awx-task PermissionError: [Errno 13] Permission denied: 'importer.py'
ADDITIONAL INFORMATION
blomquisg commented 4 years ago

@matburt does this look familiar?

ryanpetrello commented 4 years ago

This is definitely pretty weird. Are you running some sort of playbook that's laying down this importer.py as a higher privileged user?