Bug 1476883 - Upgrading with an orphaned product/repository results in 404 Error on redhat repos page
Upgrading with an orphaned product/repository results in 404 Error on redhat...
Status: CLOSED CURRENTRELEASE
Product: Candlepin
Classification: Community
Component: candlepin (Show other bugs)
2.0
Unspecified Unspecified
high Severity high
: ---
: 2.1
Assigned To: Chris "Ceiu" Rog
Katello QA List
: Triaged
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2017-07-31 13:33 EDT by Kevin Howell
Modified: 2017-09-18 14:12 EDT (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1476882
Environment:
Last Closed: 2017-09-18 14:12:32 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Foreman Issue Tracker 20245 None None None 2017-07-31 13:33 EDT

  None (edit)
Description Kevin Howell 2017-07-31 13:33:10 EDT
+++ This bug was initially created as a clone of Bug #1476882 +++

+++ This bug was initially created as a clone of Bug #1476386 +++

Description of problem:

After upgrading to 6.3 with an orphaned redhat repository/product, the redhat repositories page errors with a 404 from candlepin


How reproducible:
Always

Steps to Reproduce:
1.  On Satellite 6.2 (pre upgrade): Import a manifest
2.  Enable at least one repository
3.  Delete the manifest
4.  Upgrade to 6.3
5.  Visit the 'Red Hat Repositories" page

Actual results:
Error, the logs:

2017-07-28 16:03:22 33c833b3 [app] [F] 
 | RestClient::ResourceNotFound (Katello::Resources::Candlepin::Product: 404 Resource Not Found {"displayMessage":"Product with ID '367' could not be found.","requestUuid":"b3991f0f-62a2-4933-bda2-f93e9c4843f4"} (GET /candlepin/owners/Default_Organization/products/367/?include=name&include=attributes.name&include=attributes.value&include=productContent.content.contentUrl&include=productContent.content.label&include=productContent.content.modifiedProductIds&include=productContent.content.type&include=productContent.content.id&include=productContent.content.name)):


Expected results:
page loads fine

Additional info:
Note that deleting the manifest is the easiest way to reproduce this, but it can also happen if some subscription expired, or you've imported/refreshed a new manifest that doesn't contain the product that has a repository enabled (thus is orphaned).

--- Additional comment from Justin Sherrill on 2017-07-31 12:29:27 EDT ---

Connecting redmine issue http://projects.theforeman.org/issues/20245 from this bug
Comment 1 Kevin Howell 2017-07-31 13:33:47 EDT
This clone bz for 2.1 specifically.

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