Actions
Issue #7319
closedPulpTemporaryFile aren't being stored in /var/lib/pulp
Start date:
Due date:
Estimated time:
Severity:
2. Medium
Version:
Platform Release:
OS:
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Sprint:
Sprint 80
Quarter:
Description
We intended for these files to be stored in /var/lib/pulp[0].
In [1]: import tempfile
In [2]: with tempfile.NamedTemporaryFile("ab") as tf:
...: temp_file = PulpTemporaryFile(file=tf.name)
...: temp_file.save()
...:
In [3]: PulpTemporaryFile.objects.all()
Out[3]: <QuerySet [<PulpTemporaryFile: pk=db5b57ba-1f65-4f0c-85b5-6d01c84b7d77>]>
In [4]: PulpTemporaryFile.objects.all()[0].file
Out[4]: <FieldFile: /tmp/tmp7ttftw60>
In [5]: PulpTemporaryFile.objects.all()[0].file.read()
OSError: File does not exist: tmp/tmp7ttftw60
I think if we use ArtifactFileField[1], it should resolve this problem.
[0] https://github.com/pulp/pulpcore/blob/0f30cfefdfedc53cf79dc6ce9d12ff9e33351e96/pulpcore/app/models/content.py#L290-L298 [1] https://github.com/pulp/pulpcore/blob/b94abd64d76ea4554e6750ff38ce458eaa888cc8/pulpcore/app/models/fields.py#L11
Updated by fao89 over 4 years ago
- Triaged changed from No to Yes
- Sprint set to Sprint 79
Updated by fao89 over 4 years ago
- Status changed from NEW to ASSIGNED
- Assignee set to fao89
Updated by pulpbot over 4 years ago
- Status changed from ASSIGNED to POST
Added by Fabricio Aguiar over 4 years ago
Updated by Anonymous over 4 years ago
- Status changed from POST to MODIFIED
Applied in changeset pulpcore|5c77622365eb1e9b03f835dca5a4f536b1382cd6.
Updated by pulpbot over 4 years ago
Updated by pulpbot about 4 years ago
- Status changed from MODIFIED to CLOSED - CURRENTRELEASE
Actions
Fixed: PulpTemporaryFile stored in the wrong location
https://pulp.plan.io/issues/7319 closes #7319