Katello Katello::Errors::Pulp Error: md5 -- when trying to reposync Redhat 8 Kickstart Repos

Problem:
After upgrade to foreman-2.5.2-1.el7 / katello-4.1.1-1.el7, any time a repo sync is performed on any Redhat 8 Kickstart Base OS or AppStream Repos (kickstart 8.2, kickstart 8.3, kickstart 8.4) the following error occurs: katello Katello::Errors::Pulp Error: md5

The non-kickstart BaseOS and Appstream repos work fine and are able to be synced. This is something that appears to be unique with Redhat’s kickstart repos.

Here is the full error dump:

Actions::Pulp3::Repository::Sync

Input:
{"repo_id"=>4155,
 "smart_proxy_id"=>1,
 "options"=>{"source_url"=>nil},
 "remote_user"=>"admin",
 "remote_cp_user"=>"admin",
 "current_request_id"=>"50ad2604-32d0-400a-acab-9ce55ad26a27",
 "current_timezone"=>"America/New_York",
 "current_organization_id"=>3,
 "current_location_id"=>nil,
 "current_user_id"=>6}

Output:

{"pulp_tasks"=>
  [{"pulp_href"=>"/pulp/api/v3/tasks/5ad8c6ab-4fb2-4c89-90b0-6849eb18f430/",
    "pulp_created"=>"2021-07-23T17:52:29.801+00:00",
    "state"=>"failed",
    "name"=>"pulp_rpm.app.tasks.synchronizing.synchronize",
    "logging_cid"=>"50ad2604-32d0-400a-acab-9ce55ad26a27",
    "started_at"=>"2021-07-23T17:52:29.875+00:00",
    "finished_at"=>"2021-07-23T17:52:33.296+00:00",
    "error"=>
     {"traceback"=>
       "  File \"/usr/lib/python3.6/site-packages/pulpcore/tasking/pulpcore_worker.py\", line 266, in _perform_task\n" +
       "    result = func(*args, **kwargs)\n" +
       "  File \"/usr/lib/python3.6/site-packages/pulp_rpm/app/tasks/synchronizing.py\", line 422, in synchronize\n" +
       "    version = dv.create()\n" +
       "  File \"/usr/lib/python3.6/site-packages/pulpcore/plugin/stages/declarative_version.py\", line 151, in create\n" +
       "    loop.run_until_complete(pipeline)\n" +
       "  File \"/usr/lib64/python3.6/asyncio/base_events.py\", line 484, in run_until_complete\n" +
       "    return future.result()\n" +
       "  File \"/usr/lib/python3.6/site-packages/pulpcore/plugin/stages/api.py\", line 225, in create_pipeline\n" +
       "    await asyncio.gather(*futures)\n" +
       "  File \"/usr/lib/python3.6/site-packages/pulpcore/plugin/stages/api.py\", line 43, in __call__\n" +
       "    await self.run()\n" +
       "  File \"/usr/lib/python3.6/site-packages/pulp_rpm/app/tasks/synchronizing.py\", line 693, in run\n" +
       "    result = await downloader.run()\n" +
       "  File \"/usr/lib/python3.6/site-packages/pulpcore/download/http.py\", line 258, in run\n" +
       "    return await download_wrapper()\n" +
       "  File \"/usr/lib/python3.6/site-packages/backoff/_async.py\", line 133, in retry\n" +
       "    ret = await target(*args, **kwargs)\n" +
       "  File \"/usr/lib/python3.6/site-packages/pulpcore/download/http.py\", line 256, in download_wrapper\n" +
       "    return await self._run(extra_data=extra_data)\n" +
       "  File \"/usr/lib/python3.6/site-packages/pulp_rpm/app/downloaders.py\", line 92, in _run\n" +
       "    to_return = await self._handle_response(response)\n" +
       "  File \"/usr/lib/python3.6/site-packages/pulpcore/download/http.py\", line 212, in _handle_response\n" +
       "    await self.finalize()\n" +
       "  File \"/usr/lib/python3.6/site-packages/pulpcore/download/base.py\", line 162, in finalize\n" +
       "    self.validate_digests()\n" +
       "  File \"/usr/lib/python3.6/site-packages/pulpcore/download/base.py\", line 211, in validate_digests\n" +
       "    if expected_digest != self._digests[algorithm].hexdigest():\n",
      "description"=>"'md5'"},
    "worker"=>"/pulp/api/v3/workers/6f5baa8a-5019-48f1-801f-a83fde5cfd10/",
    "child_tasks"=>[],
    "progress_reports"=>
     [{"message"=>"Downloading Metadata Files",
       "code"=>"sync.downloading.metadata",
       "state"=>"failed",
       "done"=>9},
      {"message"=>"Downloading Artifacts",
       "code"=>"sync.downloading.artifacts",
       "state"=>"canceled",
       "done"=>0},
      {"message"=>"Associating Content",
       "code"=>"associating.content",
       "state"=>"canceled",
       "done"=>0}],
    "created_resources"=>[],
    "reserved_resources_record"=>
     ["/pulp/api/v3/repositories/rpm/rpm/374cfce0-dec1-4b03-847a-77ff8bdd960b/",
      "/pulp/api/v3/remotes/rpm/rpm/aecc5e77-2fe7-4c21-bac5-cf8004b018f5/"]}],
 "create_version"=>true,
 "task_groups"=>[],
 "poll_attempts"=>{"total"=>6, "failed"=>1}}

Error seems to be here in pulpcore/download/base.py.

        """
        if self.expected_digests:
            for algorithm, expected_digest in self.expected_digests.items():
                if expected_digest != self._digests[algorithm].hexdigest():
                    raise DigestValidationError(self.url)

Seems you’re affected by Issue #9111: can't sync rhel 8.4 baseos kickstart repo unless md5 (and sha1) is enabled - RPM Support - Pulp. It should be resolved with the release of pulp_rpm 3.14 which will be included in Katello 4.1.2 next week. In the meantime the workaround is to run the installer to enable md5, and then correct the checksums using pulpcore-manager (stand by and I’ll try to get those commands for you)

1 Like

Here’s the commands to work around it:

2 Likes

Thx Jeremy.

1 Like