Publishing a new Content View version fails inside lookup_distributor_id method
Environment
Red Hat Satellite 6.9 or older
Issue
- publishing a new Content View version fails in dynflow step
Actions::Pulp::Repository::DistributorPublishwith error per Diagnostic Steps - any attempt to republish the CV fails
Resolution
First, Skip the paused step in dynflow console and then click to Resume on top of the page, to let the task complete.
Then, go to the CV versions page - some version (most probably the newest one) should be promoted to Library. Just in case there is no such version, do another publish, skip any failed state, resume etc, to have a CV version in Library (though after an erroneous Publish).
Now, delete the CV version that is promoted to Library. If some step would fail, skip & resume it.
Then try a new CV publish - it should succeed.
For more KB articles/solutions related to Red Hat Satellite 6.x Content View Issues, please refer to the Red Hat Satellite Consolidated Troubleshooting Article for Red Hat Satellite 6.x Content View Issues.
Root Cause
There was a missing pulp repository for the CV in Library - while katello thought the pulp repository exists.
Removing the CV version that is promoted to Library will delete also the katello repository record and thus a new CV publish will create all relevant entries properly.
Diagnostic Steps
- Dynflow step
Actions::Pulp::Repository::DistributorPublishhas output:
Error:
NoMethodError
undefined method `[]' for nil:NilClass
---
- "/opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.16.0.26/app/services/katello/pulp/repository.rb:199:in
`lookup_distributor_id'"
- "/opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.16.0.26/app/services/katello/pulp/repository.rb:193:in
`block in distributor_publish'"
- "/opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.16.0.26/app/services/katello/pulp/repository.rb:191:in
`each'"
- "/opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.16.0.26/app/services/katello/pulp/repository.rb:191:in
`map'"
- "/opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.16.0.26/app/services/katello/pulp/repository.rb:191:in
`distributor_publish'"
..
/var/log/messageshas errors from the same time like:
Jul 28 16:11:02 satellite007 pulp: django.request:WARNING: Not Found: /pulp/api/v2/repositories/1-CV_Label-Library-347a4b77-02d8-49e8-95d5-e41a7cd6311d/
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.