Issue #4602
closed
/var/lib/pulp/tmp/ seems to violate the FHS
Status:
CLOSED - CURRENTRELEASE
One consideration to help inform a decision in this area. Subdirectories inside of the temporary directory is where downloaders running inside tasks write their data to. In almost all cases after saving the file there it is then moved in to place. Typically this place is on the local filesystem in the /var/lib/pulp/artifacts/... area. One performance consideration is that the copying of the file to the second location should not require the bits to be written out again. That is desirable at least.
One other FYI is that the final location can't be known until after the data's sha256 hash is calculated which produces the filepath where it is to be stored at. So we can't fully trust the final location until we already have saved all of the data to disk in the tmp area.
Just some things to think about along with this change.
When using S3, the temporary location doesn't matter. However, when using local storage, you would definitely get better performance if the temp directory was on the same physical device.
What if the default location for the temp directory was /var/tmp/pulp? At the same time the installer could create a symlink from the rest of pulp storage to there to improve performance.
The great thing about keeping them both inside /var/lib/pulp/ is that the installer doesn't need the extra responsibility so it will provide the performance benefit natively.
The best thing I can think of to do is to document this in the docs. Perhaps with a ..note sphinx option that describes that hosting the working directory on the same volume as your backend storage when hosting artifacts locally on that storage?
Isn't it that any python code that wants to use temp directories will still get /var/tmp/ right? So in that way Pulp is using the Django temp directory feature to save staged data there and not really as the FHS temp dir. Is this right?
- Triaged changed from No to Yes
- Sprint set to Sprint 51
- Status changed from NEW to ASSIGNED
- Assignee set to bmbouter
- Tags Pulp 3 added
- Status changed from ASSIGNED to POST
- Status changed from POST to MODIFIED
- Status changed from MODIFIED to POST
- Status changed from POST to MODIFIED
- Status changed from MODIFIED to CLOSED - CURRENTRELEASE
Also available in: Atom
PDF
Deployment note on volumes for working dir
There was not enough info for users to understand the relationship between the WORKING_DIRECTORY and MEDIA_ROOT settings. This note clarifies this.
https://pulp.plan.io/issues/4602 closes #4602