Actions
Issue #3551
closedRemoveOldRepodataStep for yum publisher not checking repomd.xml to remove old files
Status:
CLOSED - CURRENTRELEASE
Priority:
Normal
Assignee:
-
Sprint/Milestone:
-
Start date:
Due date:
Estimated time:
Severity:
3. High
Version:
Master
Platform Release:
2.17.0
OS:
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Pulp 2
Sprint:
Quarter:
Description
Current code in yum distributor publish doesn't actually check the files within the repodata.xml to compare the files that should be kept and files that should be deleted. Instead it makes the assumption that the latest one of each file type (to be removed) is present and removes the files older then the threshold (default 14 days). Given that mtime could be changed by someone touching a file or even moving it on the file system, it may lead to deletion of incorrect files.
related code:
for key, val in to_remove.iteritems():
# preserve at least one file of each kind - pop out latest
if not set(groupped[key]) - set(val):
val.pop(0)
for f in val:
self.remove_repodata_file(f[0])
Related issues
Actions
Fix RemoveOldRepodataStep for yum publisher
Previously RemoveOldRepodataStep step didn't actually check the files within the repodata.xml to find the files that should be deleted. Instead it made the assumption that the latest one of each file type (to be removed) was present, and removed the files older than the threshold
fixes #3551 https://pulp.plan.io/issues/3551
Co-authored-by: Blake McIvor bmcivor@redhat.com