ERROR: Unable to manage file: Jinja error: [Errno 13] Permission denied
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 15.7k
- Forks
- 5.6k
- Avg merge
- 2d 44m
- Merged PRs (30d)
- 80
Description
Description of Issue
We are tying Salt rendering in the minions. But suddenly we got below issues in couple of servers, but the same script is working fine in other servers.
Error log
Comment: Unable to manage file: Jinja error: [Errno 13] Permission denied
Traceback (most recent call last):
File "/ngs/app/vertext/salt/usr/lib/python3.7/site-packages/salt/utils/templates.py", line 394, in render_jinja_tmpl
output = template.render(**decoded_context)
File "/ngs/app/vertext/salt/usr/lib/python3.7/site-packages/jinja2/environment.py", line 1090, in render
self.environment.handle_exception()
File "/ngs/app/vertext/salt/usr/lib/python3.7/site-packages/jinja2/environment.py", line 832, in handle_exception
reraise(*rewrite_traceback_stack(source=source))
File "/ngs/app/vertext/salt/usr/lib/python3.7/site-packages/jinja2/_compat.py", line 28, in reraise
raise value.with_traceback(tb)
File "", line 5, in top-level template code
File "/ngs/app/vertext/salt/usr/lib/python3.7/site-packages/salt/modules/slsutil.py", line 171, in renderer
path_or_string = salt['cp.get_url'](path, saltenv=kwargs.get('saltenv', 'base'))
File "/ngs/app/vertext/salt/usr/lib/python3.7/site-packages/salt/modules/cp.py", line 418, in get_url
path, dest, makedirs, saltenv, source_hash=source_hash)
File "/ngs/app/vertext/salt/usr/lib/python3.7/site-packages/salt/fileclient.py", line 697, in get_url
**get_kwargs
File "/ngs/app/vertext/salt/usr/lib/python3.7/site-packages/salt/utils/http.py", line 579, in query
result = download_client.fetch(url_full, **req_kwargs)
File "/ngs/app/vertext/salt/usr/lib/python3.7/site-packages/salt/ext/tornado/httpclient.py", line 103, in fetch
self._async_client.fetch, request, **kwargs))
File "/ngs/app/vertext/salt/usr/lib/python3.7/site-packages/salt/ext/tornado/ioloop.py", line 459, in run_sync
return future_cell[0].result()
File "/ngs/app/vertext/salt/usr/lib/python3.7/site-packages/salt/ext/tornado/concurrent.py", line 239, in result
raise_exc_info(self._exc_info)
File "", line 4, in raise_exc_info
File "/ngs/app/vertext/salt/usr/lib/python3.7/site-packages/salt/ext/tornado/stack_context.py", line 317, in wrapped
ret = fn(*args, **kwargs)
Versions Report
Salt master 3004.2
Salt Minion 3000.2
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with salt/utils/templates.py at render_jinja_tmpl, then follow the traceback through salt/modules/slsutil.py, salt/modules/cp.py, salt/fileclient.py, and salt/utils/http.py. Reproduce the failure using the reported Salt versions and compare the affected and working servers' permissions and environments. Done means the permission-denied path is identified and the behavior is verified on the affected minions.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- devops, infrastructure
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100