Issue #5941
closedImporting from file:/// destroys the repo you important from
Description
Say you have two pulp_file repos, e.g.:
[bmbouter@localhost pulp3]$ tree file
file
├── 1.iso
├── 2.iso
├── 3.iso
└── PULP_MANIFEST
0 directories, 4 files
[bmbouter@localhost pulp3]$ tree file_backup
file_backup
├── 1.iso
├── 2.iso
├── 3.iso
└── PULP_MANIFEST
0 directories, 4 files
Then create a repository and remote pointing at it. In my case that is done in shell_plus with:
foo = FileRepository(name='foo')
foo.save()
bar = FileRemote(name='bar', url='file:///home/vagrant/devel/file/PULP_MANIFEST')
bar.save()
Then I trigger the sync with:
http POST :80/pulp/api/v3/repositories/file/file/879db281-731f-4705-86e7-f6fc55e6fd5a/sync/ remote=/pulp/api/v3/remotes/file/file/49e8628b-f3f9-4e5f-979a-efb572b861d7/
using the URLs of the repository and remote respectively.
Then the repository I sync'd from is gone:
(pulp) [vagrant@pulp3-source-fedora31 devel]$ tree file
file
└── PULP_MANIFEST
0 directories, 1 file
Updated by bmbouter almost 5 years ago
- Status changed from NEW to ASSIGNED
- Assignee set to bmbouter
- Sprint set to Sprint 63
Already being worked on so I added it to the sprint.
Updated by bmbouter almost 5 years ago
- Status changed from ASSIGNED to POST
PR available at: https://github.com/pulp/pulpcore/pull/486
Added by bmbouter almost 5 years ago
Updated by bmbouter almost 5 years ago
- Status changed from POST to MODIFIED
Applied in changeset pulp:pulpcore|07340fd04047141f30c216517778010193a0e555.
Added by bmbouter almost 5 years ago
Revision e40794ba | View on GitHub
Copy files when they originate out of MEDIA_ROOT
Django would move files in cases where the source was a file:/// repository.
https://pulp.plan.io/issues/5941 closes #5941
https://pulp.plan.io/issues/5870 closes #5870
(cherry picked from commit 07340fd04047141f30c216517778010193a0e555)
Updated by bmbouter almost 5 years ago
Applied in changeset pulp:pulpcore|e40794bad5f5a5084d37d9998d4fa4235f6ea25f.
Added by bmbouter almost 5 years ago
Revision 95e88eb3 | View on GitHub
Copy files when they originate out of MEDIA_ROOT
Django would move files in cases where the source was a file:/// repository.
https://pulp.plan.io/issues/5941 closes #5941
https://pulp.plan.io/issues/5870 closes #5870
(cherry picked from commit 07340fd04047141f30c216517778010193a0e555)
Updated by bmbouter almost 5 years ago
Applied in changeset pulp:pulpcore|95e88eb3ab5b9bb7472a26427a5e17a2fd12e7db.
Updated by bmbouter almost 5 years ago
- Project changed from File Support to Pulp
Moving to pulp project since the fix is released there.
Updated by bmbouter almost 5 years ago
- Status changed from MODIFIED to CLOSED - CURRENTRELEASE
Copy files when they originate out of MEDIA_ROOT
Django would move files in cases where the source was a file:/// repository.
https://pulp.plan.io/issues/5941 closes #5941
https://pulp.plan.io/issues/5870 closes #5870