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.
Bug 2038739 - Extremely difficult to tell what repositories to Verify Checksum on when there are hundreds or thousands of packages listed as corrupted
Summary: Extremely difficult to tell what repositories to Verify Checksum on when ther...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Repositories
Version: 6.9.8
Hardware: x86_64
OS: Linux
high
high
Target Milestone: 6.9.9
Assignee: Justin Sherrill
QA Contact: Gaurav Talreja
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-01-09 23:41 UTC by Taft Sanders
Modified: 2023-09-09 04:54 UTC (History)
7 users (show)

Fixed In Version: tfm-rubygem-katello-3.18.1.51-1
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-04-20 20:34:53 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 34453 0 High New Extremely difficult to tell what repositories to Verify Checksum on when there are hundreds or thousands of packages lis... 2022-02-15 16:05:55 UTC
Red Hat Issue Tracker SAT-7368 0 None None None 2022-01-10 14:11:39 UTC
Red Hat Issue Tracker SAT-8061 0 None None None 2023-09-09 04:54:46 UTC
Red Hat Knowledge Base (Solution) 6529711 0 None None None 2022-01-09 23:48:57 UTC
Red Hat Knowledge Base (Solution) 6629271 0 None None None 2022-01-09 23:48:57 UTC
Red Hat Product Errata RHSA-2022:1478 0 None None None 2022-04-20 20:35:01 UTC

Description Taft Sanders 2022-01-09 23:41:27 UTC
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)
----------------------------

Comment 1 Justin Sherrill 2022-02-15 16:05:54 UTC
Created redmine issue https://projects.theforeman.org/issues/34453 from this bug

Comment 3 Brad Buckingham 2022-02-28 11:59:31 UTC
Moving to POST as upstream PR is merged.

Comment 5 Gaurav Talreja 2022-03-28 17:17:47 UTC
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"

Comment 10 errata-xmlrpc 2022-04-20 20:34:53 UTC
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


Note You need to log in before you can comment on or make changes to this bug.