Project

General

Profile

Actions

Feature #34453

open

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 almost 3 years ago. Updated almost 3 years ago.

Status:
Ready For Testing
Priority:
High
Category:
Repositories
Difficulty:
Triaged:
Yes
Fixed in Releases:
Found in Releases:

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)
----------------------------

Actions #1

Updated by Justin Sherrill almost 3 years ago

  • 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
  • Target version changed from Katello 4.4.0 to 3.18-no-release-planned
Actions #2

Updated by The Foreman Bot almost 3 years ago

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

Updated by Jonathon Turel almost 3 years ago

  • Triaged changed from No to Yes
Actions

Also available in: Atom PDF