Project

General

Profile

Feature #34453

Extremely difficult to tell what repositories to Verify Checksum on when there are hundreds or thousands of packages listed as corrupted

Added by Justin Sherrill 5 months ago. Updated 5 months ago.

Status:
Ready For Testing
Priority:
High
Category:
Repositories
Difficulty:
Triaged:
Yes
Bugzilla link:
Fixed in Releases:
Found in Releases:
Red Hat JIRA:

Description

Description of problem:
During pulp2to3 migration, any reported corrupted content is reported in a file of the content type. Since one of the options is to verify checksum for the corresponding repository for the content that is identified as correupted, this request is to add the corresponding repositories name to the corrupted content bundle supplied by the migration process.

Version-Release number of selected component (if applicable):
Satellite 6.10

How reproducible:
n/a

Steps to Reproduce:
1.
2.
3.

Actual results:
/tmp/unmigratable_content-20220109-11817-1oil4a6/{Rpm,File} contains a list of packages/files that are identified as corrupted.

Expected results:
Either in the same files or put the information in an additional file. A list of repositories that contain the contents in the Rpm and File lists should be included in the output to allow the user to know which repository to complete the verify checksum option against.

Additional info:
The following python script is currently being supplied to users to produce this feature. This request is to build this into the migration procedure.

corrupted_migration.py
----------------------------
import pymongo
import sys

RPM_FILE = sys.argv1

rpm=[]
with open(RPM_FILE, 'r') as tmp:
for package in tmp:
rpm.append(package.strip())
myclient=pymongo.MongoClient('mongodb://localhost:27017/')
mydb=myclient['pulp_database']
CORRUPTED_REPOS=[]
for package in rpm:
mydoc = mydb['units_rpm'].find({"filename": package}, {"downloaded": 1})
for x in mydoc:
query2 = mydb['repo_content_units'].find({'unit_id': x['_id']},{'repo_id': 1})
for y in query2:
query3 = mydb['repos'].find({'repo_id': y['repo_id']},{'display_name': 1})
for z in query3:
if z['display_name'] not in CORRUPTED_REPOS:
CORRUPTED_REPOS.append(z['display_name'])

for name in CORRUPTED_REPOS:
print(name)
----------------------------

History

#1 Updated by Justin Sherrill 5 months ago

  • Target version changed from Katello 4.4.0 to 3.18-no-release-planned
  • Subject changed from Extremely difficult to tell what repositories to Verify Checksum on when there are hundreds or thousands of packages listed as corrupted to Extremely difficult to tell what repositories to Verify Checksum on when there are hundreds or thousands of packages listed as corrupted

#2 Updated by The Foreman Bot 5 months ago

  • Assignee set to Justin Sherrill
  • Status changed from New to Ready For Testing
  • Pull request https://github.com/Katello/katello/pull/9950 added

#3 Updated by Jonathon Turel 5 months ago

  • Triaged changed from No to Yes

Also available in: Atom PDF