diff --git a/CHANGES/696.bugfix b/CHANGES/696.bugfix new file mode 100644 index 000000000..a8383d8ed --- /dev/null +++ b/CHANGES/696.bugfix @@ -0,0 +1 @@ +Fixed some tasks that were using /tmp/ instead of the worker working directory. diff --git a/pulp_container/app/tasks/builder.py b/pulp_container/app/tasks/builder.py index 344d5c680..9509d8bb3 100644 --- a/pulp_container/app/tasks/builder.py +++ b/pulp_container/app/tasks/builder.py @@ -113,7 +113,7 @@ def build_image_from_containerfile( containerfile = Artifact.objects.get(pk=containerfile_pk) repository = ContainerRepository.objects.get(pk=repository_pk) name = str(uuid4()) - with tempfile.TemporaryDirectory(".") as working_directory: + with tempfile.TemporaryDirectory(dir=".") as working_directory: path = "{}/".format(working_directory.path) for key, val in artifacts.items(): artifact = Artifact.objects.get(pk=key) diff --git a/pulp_container/app/tasks/sign.py b/pulp_container/app/tasks/sign.py index 2ea422f7f..926b394c8 100644 --- a/pulp_container/app/tasks/sign.py +++ b/pulp_container/app/tasks/sign.py @@ -89,7 +89,7 @@ def create_signature(manifest, reference, signing_service): pk of created ManifestSignature. """ - with tempfile.TemporaryDirectory(".") as working_directory: + with tempfile.TemporaryDirectory(dir=".") as working_directory: # download and write file for object storage if settings.DEFAULT_FILE_STORAGE != "pulpcore.app.models.storage.FileSystem": manifest_file = tempfile.NamedTemporaryFile(dir=working_directory, delete=False)