Project

Profile

Help

Story #5613

closed

As a user, I have an API based way to report and redownload (if possible) corrupted content on the file system for one repository

Added by jsherril@redhat.com over 4 years ago. Updated almost 4 years ago.

Status:
CLOSED - CURRENTRELEASE
Priority:
Normal
Assignee:
Category:
-
Sprint/Milestone:
Start date:
Due date:
% Done:

100%

Estimated time:
Platform Release:
Groomed:
Yes
Sprint Candidate:
Yes
Tags:
Katello
Sprint:
Sprint 70
Quarter:

Description

Motivation

Users can experience corrupted files either due to bit rot on mechanical hard drives or mistakenly run commands. We should make it as easy as possible to correct this situation when we can.

Idea

Make a new API endpoint that lives at /pulp/api/v3/repair/ and has 1 required parameter repository which is the href to the repository that is being requested to be repaired. Initially every request will be for a single repository.

Details

1. examines all downloaded content in the latest version and checks to see if each unit matches its expected checksum
2. re-downloads any corrupted files if possible based on RemoteArtifact entries in db 3. reports any units that could not be re-downloaded as counts

API Response

{
	"pulp_created": "2019-07-23T08:18:12.927007Z",
	"pulp_href": "/pulp/api/v3/task-groups/59f8a786-c7d7-4e2b-ad07-701479d403c5/",
	"repository_version_href": "/pulp/api/v3/repository/<path to the repository version/",
	"repaired": [
		"/pulp/api/v3/content/file/files/c23def43-44bc-45f4-8a6f-0310285f5339/",
		"/pulp/api/v3/content/file/files/18swef43-98s1-8d71-s8u1-0310285ffiq/"
	],
	"unrepairable": [
		"/pulp/api/v3/content/file/files/c23def43-44bc-45f4-8a6f-0310285f5339/"
	],
}

Note

This is only going to fix bitrot/corrupted files. It only inspects the content contained in the latest repository version, and does not consider if that repository version is an accurate or complete representation of the remote filesystem.


Related issues

Has duplicate Pulp - Story #5159: As a user, I can optionally validate and repair content at sync timeCLOSED - DUPLICATE

Actions

Also available in: Atom PDF