Actions
Issue #7698
closedError when syncing a remote if systemd working dir is set to ~
Start date:
Due date:
Estimated time:
Severity:
2. Medium
Version:
Platform Release:
OS:
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Katello
Sprint:
Sprint 85
Quarter:
Description
a recent change: https://github.com/theforeman/puppet-pulpcore/commit/b3b7c133c513dd2c30b00a81e64b2bb33ca92397
caused this error when syncing a remote:
File "/usr/lib/python3.6/site-packages/rq/job.py", line 684, in perform
self._result = self._execute()
File "/usr/lib/python3.6/site-packages/rq/job.py", line 690, in _execute
return self.func(*self.args, **self.kwargs)
File "/usr/lib/python3.6/site-packages/pulp_rpm/app/tasks/synchronizing.py", line 213, in synchronize
remote_url = fetch_remote_url(remote)
File "/usr/lib/python3.6/site-packages/pulp_rpm/app/tasks/synchronizing.py", line 138, in fetch_remote_url
downloader.fetch()
File "/usr/lib/python3.6/site-packages/pulpcore/download/base.py", line 160, in fetch
return done.pop().result()
File "/usr/lib/python3.6/site-packages/pulpcore/download/base.py", line 227, in run
return await self._run(extra_data=extra_data)
File "/usr/lib/python3.6/site-packages/pulp_rpm/app/downloaders.py", line 89, in _run
to_return = await self._handle_response(response)
File "/usr/lib/python3.6/site-packages/pulpcore/download/http.py", line 184, in _handle_response
await self.handle_data(chunk)
File "/usr/lib/python3.6/site-packages/pulpcore/download/base.py", line 123, in handle_data
self._ensure_writer_has_open_file()
File "/usr/lib/python3.6/site-packages/pulpcore/download/base.py", line 108, in _ensure_writer_has_open_file
self._writer = tempfile.NamedTemporaryFile(dir=os.getcwd(), delete=False)
File "/usr/lib64/python3.6/tempfile.py", line 551, in NamedTemporaryFile
(fd, name) = _mkstemp_inner(dir, prefix, suffix, flags, output_type)
File "/usr/lib64/python3.6/tempfile.py", line 262, in _mkstemp_inner
fd = _os.open(file, flags, 0o600)
PermissionError: [Errno 13] Permission denied: '/tmpw64sk7in'
Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/rq/worker.py", line 936, in perform_job
rv = job.perform()
File "/usr/lib/python3.6/site-packages/rq/job.py", line 684, in perform
self._result = self._execute()
File "/usr/lib/python3.6/site-packages/rq/job.py", line 690, in _execute
return self.func(*self.args, **self.kwargs)
File "/usr/lib/python3.6/site-packages/pulp_rpm/app/tasks/synchronizing.py", line 213, in synchronize
remote_url = fetch_remote_url(remote)
File "/usr/lib/python3.6/site-packages/pulp_rpm/app/tasks/synchronizing.py", line 138, in fetch_remote_url
downloader.fetch()
File "/usr/lib/python3.6/site-packages/pulpcore/download/base.py", line 160, in fetch
return done.pop().result()
File "/usr/lib/python3.6/site-packages/pulpcore/download/base.py", line 227, in run
return await self._run(extra_data=extra_data)
File "/usr/lib/python3.6/site-packages/pulp_rpm/app/downloaders.py", line 89, in _run
to_return = await self._handle_response(response)
File "/usr/lib/python3.6/site-packages/pulpcore/download/http.py", line 184, in _handle_response
await self.handle_data(chunk)
File "/usr/lib/python3.6/site-packages/pulpcore/download/base.py", line 123, in handle_data
self._ensure_writer_has_open_file()
File "/usr/lib/python3.6/site-packages/pulpcore/download/base.py", line 108, in _ensure_writer_has_open_file
self._writer = tempfile.NamedTemporaryFile(dir=os.getcwd(), delete=False)
File "/usr/lib64/python3.6/tempfile.py", line 551, in NamedTemporaryFile
(fd, name) = _mkstemp_inner(dir, prefix, suffix, flags, output_type)
File "/usr/lib64/python3.6/tempfile.py", line 262, in _mkstemp_inner
fd = _os.open(file, flags, 0o600)
PermissionError: [Errno 13] Permission denied: '/tmpw64sk7in'
Actions
Sync to happen inside working directory
few downloads or testing remote remomd.xml file happened outside a working directory
[nocoverage] [notest]
closes: #7698 https://pulp.plan.io/issues/7698