Bug 1316604

Summary: Update with content hosts no longer in candlepin breaks the migration
Product: Red Hat Satellite Reporter: Walden Raines <walden>
Component: CandlepinAssignee: Walden Raines <walden>
Status: CLOSED ERRATA QA Contact: Katello QA List <katello-qa-list>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: NightlyCC: mmccune, sghai, sthirugn, walden
Target Milestone: UnspecifiedKeywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
URL: http://projects.theforeman.org/issues/13856
Whiteboard:
Fixed In Version: rubygem-katello-3.0.0.26-1 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-07-27 11:03:14 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Walden Raines 2016-03-10 15:11:25 UTC
If you have some hosts no longer in Candlepin and Katello didn't keep track of it, the migration that creates content host facets will fail. Instead, we should avoid creating these facets for hosts whose UUID 404s on Candlepin.

Comment 1 Walden Raines 2016-03-10 15:11:27 UTC
Created from redmine issue http://projects.theforeman.org/issues/13856

Comment 2 Walden Raines 2016-03-10 15:11:29 UTC
Upstream bug assigned to dlobatog

Comment 4 Bryan Kearney 2016-03-10 17:04:41 UTC
Upstream bug component is Candlepin

Comment 5 Walden Raines 2016-03-10 18:09:00 UTC
PR - https://github.com/Katello/katello/pull/5867

Comment 6 Bryan Kearney 2016-03-15 16:05:00 UTC
Moving to POST since upstream bug http://projects.theforeman.org/issues/13856 has been closed
-------------
Walden Raines
Applied in changeset commit:katello|6d6ad9287802cfdd0a2dfdc2ae50db96366bb2dd.

Comment 7 Sachin Ghai 2016-06-29 11:10:46 UTC
Hey Walden, Could you please provide steps to verify this bz ?

Comment 8 Walden Raines 2016-06-29 13:42:02 UTC
(In reply to Sachin Ghai from comment #7)
> Hey Walden, Could you please provide steps to verify this bz ?

This is a bad bug report (especially for someone who spent many years as a QA Engineer) and I'd be happy to add some steps to reproduce.   This is an issue we ran into in the wild so I'm not entirely sure how the user got into the state they were in.  

Steps to Reproduce:

1. Find or create a host that only exists in the katello database and not in candlepin. You could maybe do this using SQL.  Either creating a host row manually in the katello datebase or creating a host regularly and then removing it from the candlepin database.
2. Run the migration and not the above failure

I'm sorry these steps to reproduce aren't as precise as either you or I would like but we aren't really sure how the user got into this state.

Comment 9 Bryan Kearney 2016-07-27 11:03:14 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2016:1501