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.
Bug 1339763 - Upgrade with an existing capsule fails with migration issues
Summary: Upgrade with an existing capsule fails with migration issues
Keywords:
Status: CLOSED DUPLICATE of bug 1339682
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Upgrades
Version: 6.2.0
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: Unspecified
Assignee: Brad Buckingham
QA Contact: Katello QA List
URL:
Whiteboard:
Depends On:
Blocks: 1335807
TreeView+ depends on / blocked
 
Reported: 2016-05-25 19:28 UTC by John Mitsch
Modified: 2019-04-01 20:27 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-05-26 01:46:25 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
upgrade logs (8.29 KB, text/plain)
2016-05-25 19:28 UTC, John Mitsch
no flags Details
satellite.log.run3 (898.11 KB, text/plain)
2016-05-26 00:57 UTC, Brad Buckingham
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 15193 0 None None None 2016-05-26 01:42:53 UTC

Description John Mitsch 2016-05-25 19:28:27 UTC
Created attachment 1161593 [details]
upgrade logs

Description of problem:
db:seed step is failing during upgrade

In the logs I found: (attached is full output)

StandardError: An error has occurred, this and all later migrations canceled:
Could not find the source association(s) :content_facets in model MigrateContentHosts::ContentFacetRepository. Try 'has_many :bound_repositories, :through => :content_facet_repositories, :source => <name>'. Is it one of content_facet or repository?/opt/rh/rh-ror41/root/usr/share/gems/gems/activerecord-4.1.5/lib/active_record/reflection.rb:698:in `check_validity!'

This seems to only happen when a capsule is installed and a repo is synced

Version-Release number of selected component (if applicable):
6.1 > 6.2

How reproducible:
Always

Steps to Reproduce:
1.Install 6.1
2.Install a capsule
3.Sync at least one repo
4.Upgrade to 6.2

Actual results:
Upgrade fails

Expected results:
Upgrade succeeds


Additional info:

Comment 1 Brad Buckingham 2016-05-26 00:56:46 UTC
After addressing the error in the description, the next error is:

PG::Error: ERROR:  update or delete on table "katello_systems" violates foreign key constraint "smart_proxies_content_host_id_fk" on table "smart_proxies"
DETAIL:  Key (id)=(2) is still referenced from table "smart_proxies".
: DELETE FROM "katello_systems" WHERE "katello_systems"."id" = $1/opt/rh/rh-ror41/root/usr/share/gems/gems/activerecord-4.1.5/lib/active_record/connection_adapters/postgresql_adapter.rb:834:in `get_last_result'


Attaching satellite.log.run3 with full details.

Comment 2 Brad Buckingham 2016-05-26 00:57:18 UTC
Created attachment 1161675 [details]
satellite.log.run3

Comment 3 Brad Buckingham 2016-05-26 01:42:51 UTC
Created redmine issue http://projects.theforeman.org/issues/15193 from this bug

Comment 4 Brad Buckingham 2016-05-26 01:46:25 UTC
There were actually several errors related to getting the 'MigrateContentHosts' migration to succeed.  The first one was documented in bug 1339682.  Since that bug has not been merged yet and the overall changes are small, I am going to bundle all of the changes bug 1339682.  This will reduce overhead on the release and QE teams.

*** This bug has been marked as a duplicate of bug 1339682 ***


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