[Pulp-dev] Proposal: Changing in 3.1 that Artifact.save() will hard-link/copy, not move

Brian Bouterse bmbouter at redhat.com
Tue Jan 7 21:45:54 UTC 2020


We had two bugs filed recently [0][1] which suggest that when using the
default backend for Pulp, i.e. pulpcore.app.models.storage.FileSystem Pulp
should not be "moving" files. This is the default behavior Django gives us,
and it destroys data when sync'ed from file:/// for example [1].

I propose that with 3.1 we fix this bug by switching
pulpcore.app.models.storage.FileSystem
to leave files in place and either hard-link (same filesystem) or copy
(different filesystem).

This will require files to be cleaned up where before the were "moved" so
they didn't need cleanup. This will include worker temp directories,
uploaded files, uploaded files w/ the chunked API, and downloaded files
during sync. I believe this is all straightforward, but an important
side-effect of this change to identify. Plugin writers that manage files
would also need to handle this, but can mostly rely on pulpcore cleaning up
the worker temp directories and user-uploaded files.

What do you think about this? Do you have concerns? Is there something
better we can do?

[0]: https://pulp.plan.io/issues/5870
[1]: https://pulp.plan.io/issues/5941

Thanks,
Brian
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/pulp-dev/attachments/20200107/51c9b28e/attachment.htm>


More information about the Pulp-dev mailing list