Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
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.
We often see this error:
2018-05-30 03:17:06 71ef6e3c [app] [E] RestClient::Gone: Katello::Resources::Candlepin::Consumer: 410 Gone {"displayMessage":"Unit 1ab7b861-bf5c-447d-8527-71b936314c76 has been deleted","requestUuid":"40a90ae6-e92c-4387-a7a7-05a43fc63f11","deletedId":"1ab7b861-bf5c-447d-8527-71b936314c76"} (GET /candlepin/consumers/1ab7b861-bf5c-447d-8527-71b936314c76)
| Body: {"displayMessage":"Unit 1ab7b861-bf5c-447d-8527-71b936314c76 has been deleted","requestUuid":"40a90ae6-e92c-4387-a7a7-05a43fc63f11","deletedId":"1ab7b861-bf5c-447d-8527-71b936314c76"}
| /opt/theforeman/tfm/root/usr/share/gems/gems/rest-client-1.8.0/lib/restclient/abstract_response.rb:74:in `return!'
| /opt/theforeman/tfm/root/usr/share/gems/gems/rest-client-1.8.0/lib/restclient/request.rb:495:in `process_result'
| /opt/theforeman/tfm/root/usr/share/gems/gems/rest-client-1.8.0/lib/restclient/request.rb:421:in `block in transmit'
It is because katello and candlepin somehow got misaligned. To fix this issue, people need to delete the host in foreman-rake console. In some cases, it is quite risky to ask customers to perform this. Ideally, there should be a script like foreman-rake katello:correct_repositories to correct products in a safe manner:
foreman-rake katello:correct_products
# foreman-rake katello:clean_backend_objects
The following changes will not actually be performed. Rerun with COMMIT=true to apply the changes
0 orphaned consumer id(s) found in candlepin.
0 orphaned consumer id(s) found in pulp.
Hi Mike,
It seems like katello:clean_backend_objects only cleans up hosts and other stuff like orphaned consumers, but not orphaned products in foreman. By looking at
/home/mjia/katello/app/models/katello/glue/provider.rb L160-163
product_to_remove_ids = (product_in_katello_ids - products_in_candlepin_ids).uniq
product_to_remove_ids.each do |cp_id|
product = Product.find_by_cp_id(cp_id, self.organization)
Rails.logger.warn "Orphaned Product id #{product.id} found while refreshing/importing manifest."
end
end
Why a warning message is logged instead of deleting the orphaned product?
We often see this error: 2018-05-30 03:17:06 71ef6e3c [app] [E] RestClient::Gone: Katello::Resources::Candlepin::Consumer: 410 Gone {"displayMessage":"Unit 1ab7b861-bf5c-447d-8527-71b936314c76 has been deleted","requestUuid":"40a90ae6-e92c-4387-a7a7-05a43fc63f11","deletedId":"1ab7b861-bf5c-447d-8527-71b936314c76"} (GET /candlepin/consumers/1ab7b861-bf5c-447d-8527-71b936314c76) | Body: {"displayMessage":"Unit 1ab7b861-bf5c-447d-8527-71b936314c76 has been deleted","requestUuid":"40a90ae6-e92c-4387-a7a7-05a43fc63f11","deletedId":"1ab7b861-bf5c-447d-8527-71b936314c76"} | /opt/theforeman/tfm/root/usr/share/gems/gems/rest-client-1.8.0/lib/restclient/abstract_response.rb:74:in `return!' | /opt/theforeman/tfm/root/usr/share/gems/gems/rest-client-1.8.0/lib/restclient/request.rb:495:in `process_result' | /opt/theforeman/tfm/root/usr/share/gems/gems/rest-client-1.8.0/lib/restclient/request.rb:421:in `block in transmit' It is because katello and candlepin somehow got misaligned. To fix this issue, people need to delete the host in foreman-rake console. In some cases, it is quite risky to ask customers to perform this. Ideally, there should be a script like foreman-rake katello:correct_repositories to correct products in a safe manner: foreman-rake katello:correct_products