Actions
Issue #8305
closedDeleting a remote used as source for live content corrupts ContentArtifact records
Status:
CLOSED - DUPLICATE
Priority:
Normal
Assignee:
-
Category:
-
Sprint/Milestone:
-
Start date:
Due date:
Estimated time:
Severity:
3. High
Version:
Platform Release:
OS:
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Sprint:
Sprint 112
Quarter:
Description
Ticket moved to GitHub: "pulp/pulpcore/1975":https://github.com/pulp/pulpcore/issues/1975
- Create a repository and on_demand remote, and sync them.
- Delete the remote
The deletion of the Remote deletes the RemoteArtifacts, leaving behind ContentArtifact attached to neither Artifacts nor Remotes, making them effectively corrupted and unpublishable.
# create repository, remote
remote = remote_api.create(gen_file_remote(policy='on_demand'))
repo = repo_api.create(gen_repo())
# sync the repository
repository_sync_data = RepositorySyncURL(remote=remote.pulp_href)
sync_response = repo_api.sync(repo.pulp_href, repository_sync_data)
task = monitor_task(sync_response.task)
# delete the remote
monitor_task(remote_api.delete(remote.pulp_href).task)
# ^---- problem occurs here, now RemoteArtifacts deleted, now ContentArtifact is broken
publish_response = publications_api.create({"repository_version": task.created_resources[0]})
monitor_task(publish_response.task) # boom publish failure
This is more pernicious because content units can move throughout repositories, and if the remote is ever deleted, every repo can be broken at once with no safeguards.
Files
Related issues
Actions