Some Pulp3 guidance needed


For the better part of the past two hours, I have been trying to upload 3 files to a Katello 3.16 “file” repository usign the Ansible modules for Foreman (version 1.4.0).

First, I ran into a bug in the Ansible modules (

Once I applied to patch mentioned in the GitHub issue, I was hit by a Katello problem: [Katello] Can't Delete Package "NoMethodError: undefined method `repository_href' for nil:NilClass"

After completing the workaround detailed in that link, I now receive this error message:sha512 checksum must be unique, which seems to be Pulp3’s way of saying that the files I am trying to upload already exist in Pulp (

However, Foreman tells me the files are not in the repository; hence I suspect there is some discrepancy between the actual contents of the Pulp file repository and Foreman’s idea of what is in there.

Normally I would just delete the repository and reupload everything again, but the product is part of many published content views and publishing and syncing all of them to remove the product and later add it back again seems awfully complicated.

Is there some way of manually deleting the files in Pulp3? Where can I find the required credentials for connecting to Pulp3? I can’t seem to get past the “Authentication credentials were not provided” message no matter what.

Expected outcome:

Simple things like uploading files to already existing repositories should not result in hours of troubleshooting.

Foreman and Proxy versions:


Foreman and Proxy plugin versions:

Foreman 2.1.4
Katello 3.16 (upgraded from existing 3.15 server)

Distribution and version:

CentOS 7

Other relevant data:

Seems to match Bug #31202: Upload Package action should be resumable to avoid dangling pulpcore-artifacts - Katello - Foreman

Any idea on how to rectify this manually? Specifically, how can I authenticate to the Pulp 3 API (using curl or whatever)?

Hey @fbachmann,

Sorry to hear about your troubles! The file repositories were converted to Pulp 3, we do expect some unforseen issues with the new version, while they are frustrating, we appreciate you letting us know.

As for the discrepency between Katello and Pulp, @sajha may have a better idea on further debugging and workarounds. Pulp 3 doesn’t have a cli tool just yet, but we can interact with it through the API.

@sajha any thoughts on where to start?

Hey @fbachmann,

Thanks for raising this. Since the artifact didn’t get associated to the repository, you could try running the katello:delete_orphaned_content task in foreman console and try uploading again. The issue you linked here seems to be what you are seeing as well.

To curl the pulp3 API, you need to provide the certs in the curl, something like this:
curl --cert /etc/pki/katello/certs/pulp-client.crt --key /etc/pki/katello/private/pulp-client.key https://hostname /pulp/api/v3/repositories/file/file/ | python -m json.tool

Let us know if that works for you.

1 Like

Thanks @John_Mitsch and @sajha,for your gentle help. I fully understand that many things can break in a project as diverse as Foreman/Katello especially when transitioning underlying support libraries/technologies, so please forgive me if I allowed my (temporary) frustration to shine through.

I ran foreman-rake katello:delete_orphaned_content and voilá, files can be uploaded again without problems using the Ansible modules. The cleanup tasks didn’t even run that long, maybe a couple of minutes with the bulk of the time being spent on Pulp 2.

Also I will play around with the Pulp3 API, thanks for the hint on the location of the client certificate + key files.


executing foreman-rake katello:delete_orphaned_content also worked for me. Thanks for the workaround

1 Like