Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
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.argv[1]
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)
----------------------------
Verified.
Tested on Satellite 6.9.9 Snap 1.0
Version: tfm-rubygem-katello-3.18.1.53-1.el7sat.noarch
Steps:
1. Sync some repositories with an immediate download policy, and publish them in CV.
2. 'corrupt' some files in /var/lib/pulp/content/ by either deleting them or echo'ing extra data to them like "echo foobar >> /var/lib/pulp/content/path/to/file.rpm"
3. # foreman-maintain content prepare
4. # foreman-maintain content migration-stats
Observation:
Tested with older 6.9.z where identified corrupt content is added /tmp/unmigratable_content/{Rpm,File} as a list of packages/files, with no other info.
And after-fix more info is included to that {Rpm,File} in csv format of "filename,id,Repository Name,Content View Name,Content View Version"
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory (Important: Satellite 6.9.9 Async Bug Fix Update), and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.
https://access.redhat.com/errata/RHSA-2022:1478
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.argv[1] 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) ----------------------------