Bug 1654801 - Syncing down "Red Hat Enterprise Linux 6 Server RPMs x86_64 6.9" fails: Checksum type \"sha1\" is not available for all units in the repository
Summary: Syncing down "Red Hat Enterprise Linux 6 Server RPMs x86_64 6.9" fails: Check...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Pulp
Version: Unspecified
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: 6.10.0
Assignee: satellite6-bugs
QA Contact: Lai
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-11-29 17:25 UTC by David Davis
Modified: 2021-11-16 14:08 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-11-16 14:08:27 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Pulp Redmine 8555 0 Normal CLOSED - WORKSFORME Verify that Pulp can handle mixed-checksum repositories politely 2021-10-18 07:09:51 UTC
Red Hat Product Errata RHSA-2021:4702 0 None None None 2021-11-16 14:08:40 UTC

Description David Davis 2018-11-29 17:25:03 UTC
Description of problem:

Syncing down "Red Hat Enterprise Linux 6 Server RPMs x86_64 6.9" fails with ON_DEMAND.


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


Pretty much any version of Satelilte 6. We tested 6.5.0 and 6.4.2.


How reproducible:

100%


Steps to Reproduce:
1. Import your manifest, etc
2. Enable "Red Hat Enterprise Linux 6 Server RPMs x86_64 6.9" and make sure your download policy is set to "On Demand"
3. Sync the repository

Actual results:

Failure. See stacktrace in next comment.


Expected results:

Success.


Additional info:

I think the cause is that 6.9 has sha1 in repomd.xml, but sha256 in primary.xml.

Comment 3 David Davis 2018-11-29 17:25:39 UTC
Stacktrace:

     "Traceback (most recent call last):\n" +
     "  File \"/usr/lib/python2.7/site-packages/celery/app/trace.py\", line 367, in trace_task\n" +
     "    R = retval = fun(*args, **kwargs)\n" +
     "  File \"/usr/lib/python2.7/site-packages/pulp/server/async/tasks.py\", line 529, in __call__\n" +
     "    return super(Task, self).__call__(*args, **kwargs)\n" +
     "  File \"/usr/lib/python2.7/site-packages/pulp/server/async/tasks.py\", line 107, in __call__\n" +
     "    return super(PulpTask, self).__call__(*args, **kwargs)\n" +
     "  File \"/usr/lib/python2.7/site-packages/celery/app/trace.py\", line 622, in __protected_call__\n" +
     "    return self.run(*args, **kwargs)\n" +
     "  File \"/usr/lib/python2.7/site-packages/pulp/server/controllers/repository.py\", line 1109, in publish\n" +
     "    result = check_publish(repo_obj, dist_id, dist_inst, transfer_repo, conduit, call_config)\n" +
     "  File \"/usr/lib/python2.7/site-packages/pulp/server/controllers/repository.py\", line 1206, in check_publish\n" +
     "    result = _do_publish(repo_obj, dist_id, dist_inst, transfer_repo, conduit, call_config)\n" +
     "  File \"/usr/lib/python2.7/site-packages/pulp/server/controllers/repository.py\", line 1258, in _do_publish\n" +
     "    publish_report = publish_repo(transfer_repo, conduit, call_config)\n" +
     "  File \"/usr/lib/python2.7/site-packages/pulp/server/async/tasks.py\", line 737, in wrap_f\n" +
     "    return f(*args, **kwargs)\n" +
     "  File \"/usr/lib/python2.7/site-packages/pulp_rpm/plugins/distributors/yum/distributor.py\", line 174, in publish_repo\n" +
     "    return self._publisher.process_lifecycle()\n" +
     "  File \"/usr/lib/python2.7/site-packages/pulp/plugins/util/publish_step.py\", line 572, in process_lifecycle\n" +
     "    super(PluginStep, self).process_lifecycle()\n" +
     "  File \"/usr/lib/python2.7/site-packages/pulp/plugins/util/publish_step.py\", line 163, in process_lifecycle\n" +
     "    step.process()\n" +
     "  File \"/usr/lib/python2.7/site-packages/pulp/plugins/util/publish_step.py\", line 239, in process\n" +
     "    self._process_block(item=item)\n" +
     "  File \"/usr/lib/python2.7/site-packages/pulp/plugins/util/publish_step.py\", line 301, in _process_block\n" +
     "    self.process_main(item=item)\n" +
     "  File \"/usr/lib/python2.7/site-packages/pulp_rpm/plugins/distributors/yum/publish.py\", line 499, in process_main\n" +
     "    context.add_unit_metadata(unit)\n" +
     "  File \"/usr/lib/python2.7/site-packages/pulp_rpm/plugins/distributors/yum/metadata/filelists.py\", line 42, in add_unit_metadata\n" +
     "    self.metadata_file_handle.write(unit.render_filelists(self.checksum_type))\n" +
     "  File \"/usr/lib/python2.7/site-packages/pulp_rpm/plugins/db/models.py\", line 868, in render_filelists\n" +
     "    context = Context({'pkgid': self.get_or_calculate_and_save_checksum(checksumtype)})\n" +
     "  File \"/usr/lib/python2.7/site-packages/pulp_rpm/plugins/db/models.py\", line 258, in get_or_calculate_and_save_checksum\n" +
     "    checksumtype=checksumtype)\n" +
     "PulpCodedException: Checksum type \"sha1\" is not available for all units in the repository. Make sure those units have been downloaded.\n",

Comment 4 pulp-infra@redhat.com 2018-12-03 16:31:38 UTC
The Pulp upstream bug status is at NEW. Updating the external tracker on this bug.

Comment 5 pulp-infra@redhat.com 2018-12-03 16:31:40 UTC
The Pulp upstream bug priority is at Normal. Updating the external tracker on this bug.

Comment 6 David Davis 2018-12-04 15:44:34 UTC
FYI, I think a lot of the customer cases on https://bugzilla.redhat.com/show_bug.cgi?id=1586336 are actually due to this bug and not the bug outlined in BZ #1586336.

Comment 7 David Davis 2019-03-04 12:21:14 UTC
This was resolved by having RCM publish both repomd.xml and primary.xml using the same checksum. Programatically we should consider having Pulp be able to handle different checksum types.

Comment 8 Tanya Tereshchenko 2020-01-03 17:55:25 UTC
I suggest WONTFIX for pulp 2 and see if the issue is present in Pulp 3 and find a solution there.

Comment 9 David Davis 2020-01-03 18:46:57 UTC
@ttereshc, I agree.

Comment 10 Tanya Tereshchenko 2020-01-06 17:41:28 UTC
Keeping it as a Pulp 3 item.

Comment 12 Tanya Tereshchenko 2021-04-19 14:54:46 UTC
This should work in Pulp 3. The BZ is for QE to verify.

Comment 15 pulp-infra@redhat.com 2021-10-12 14:09:40 UTC
The Pulp upstream bug status is at NEW. Updating the external tracker on this bug.

Comment 16 pulp-infra@redhat.com 2021-10-12 14:09:42 UTC
The Pulp upstream bug priority is at Normal. Updating the external tracker on this bug.

Comment 17 pulp-infra@redhat.com 2021-10-18 07:09:51 UTC
The Pulp upstream bug status is at CLOSED - WORKSFORME. Updating the external tracker on this bug.

Comment 21 errata-xmlrpc 2021-11-16 14:08:27 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 (Moderate: Satellite 6.10 Release), 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-2021:4702


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