Skip to content

Commit

Permalink
Taught import-task to extract into current-working-dir.
Browse files Browse the repository at this point in the history
fixes #8610
[nocoverage]
  • Loading branch information
ggainey authored and bmbouter committed Dec 8, 2021
1 parent fed018b commit 2f565c9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGES/8610.bugfix
@@ -0,0 +1,4 @@
PulpImporter now unpacks into the task-worker's working directory rather than /tmp. Unpacking
large files into /tmp could cause the operation to fail, or even cause stability issues for
Pulp instance, due to running /tmp out of space.

2 changes: 1 addition & 1 deletion pulpcore/app/tasks/importer.py
Expand Up @@ -374,7 +374,7 @@ def validate_and_assemble(toc_filename):
)
CreatedResource.objects.create(content_object=the_import)

with tempfile.TemporaryDirectory() as temp_dir:
with tempfile.TemporaryDirectory(dir=".") as temp_dir:
with tarfile.open(path, "r:gz") as tar:
tar.extractall(path=temp_dir)

Expand Down

0 comments on commit 2f565c9

Please sign in to comment.