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 1334961 - migrate_foreman error upgrading from 6.1 to 6.2 -> error: katello_content_facets during foreman migration
Summary: migrate_foreman error upgrading from 6.1 to 6.2 -> error: katello_content_fac...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Provisioning
Version: 6.2.0
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: Unspecified
Assignee: Ivan Necas
QA Contact: Lukas Pramuk
URL:
Whiteboard:
: 1335750 (view as bug list)
Depends On:
Blocks: 1335807
TreeView+ depends on / blocked
 
Reported: 2016-05-10 23:26 UTC by Brad Buckingham
Modified: 2019-09-26 14:47 UTC (History)
5 users (show)

Fixed In Version: foreman-1.11.0.28-1
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-07-27 11:43:06 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
katello.log during upgrade (93.29 KB, text/plain)
2016-05-10 23:26 UTC, Brad Buckingham
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 15011 0 None None None 2016-05-11 16:08:45 UTC

Description Brad Buckingham 2016-05-10 23:26:55 UTC
Created attachment 1155912 [details]
katello.log during upgrade

Description of problem:

Attempting to upgrade to an early version of Satellite 6.2 Beta (internal build) from 6.1 is resulting in an error during foreman_migrate.

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

foreman-1.11.0.21-1.el7sat.noarch
tfm-rubygem-katello-3.0.0.26-1.el7sat.noarch

How reproducible:

Always

Steps to Reproduce:
1. install Satellite 6.1
2. update packages to Satellite 6.2
3. patch system to include fixes for bug 1332700 and bug 1333027
4. foreman-installer --upgrade

Actual results:

# foreman-installer --upgrade
Upgrading...
Upgrade Step: stop_services...
Upgrade Step: start_databases...
Upgrade Step: update_http_conf...
Upgrade Step: migrate_pulp...
Upgrade Step: start_httpd...
Upgrade Step: migrate_candlepin...
Upgrade Step: migrate_foreman...
Upgrade step migrate_foreman failed. Check logs for more information.

Expected results:

No error during the migrate_foreman step.

Additional info:

Note: see attached log for complete installer run.

In the /var/log/foreman-installer/katello.log, the following is observed:

...[snip]...

[ERROR 2016-05-10 22:03:29 main] API controllers newer than Apipie cache! Run apipie:cache rake task to regenerate cache.
/opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.0.0.26/config/routes/overrides.rb:3: warning: already initialized constant Katello::WhitelistConstraint::PATHS
/opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.0.0.26/config/routes/overrides.rb:3: warning: previous definition of PATHS was here
rake aborted!
StandardError: An error has occurred, this and all later migrations canceled:

PG::Error: ERROR:  relation "katello_content_facets" does not exist
LINE 5:                WHERE a.attrelid = '"katello_content_facets"'...
                                          ^
:               SELECT a.attname, format_type(a.atttypid, a.atttypmod),
                     pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod
                FROM pg_attribute a LEFT JOIN pg_attrdef d
                  ON a.attrelid = d.adrelid AND a.attnum = d.adnum
               WHERE a.attrelid = '"katello_content_facets"'::regclass
                 AND a.attnum > 0 AND NOT a.attisdropped
               ORDER BY a.attnum

...[snip]...

/usr/share/foreman/db/migrate/20140910153654_move_host_nics_to_interfaces.rb:24:in `block in up'
/opt/rh/rh-ror41/root/usr/share/gems/gems/activerecord-4.1.5/lib/active_record/relation/delegation.rb:46:in `each'
/opt/rh/rh-ror41/root/usr/share/gems/gems/activerecord-4.1.5/lib/active_record/relation/delegation.rb:46:in `each'
/usr/share/foreman/db/migrate/20140910153654_move_host_nics_to_interfaces.rb:20:in `up'

...[snip]...

Comment 2 Ivan Necas 2016-05-11 16:08:44 UTC
Created redmine issue http://projects.theforeman.org/issues/15011 from this bug

Comment 3 Ivan Necas 2016-05-11 16:13:18 UTC
Proposed fix https://github.com/theforeman/foreman/pull/3519

Comment 4 Bryan Kearney 2016-05-11 18:16:48 UTC
Upstream bug component is Provisioning

Comment 5 Ivan Necas 2016-05-16 10:36:02 UTC
Merged upstream

Comment 6 Bryan Kearney 2016-05-16 10:40:20 UTC
Moving to POST since upstream bug http://projects.theforeman.org/issues/15011 has been closed

Comment 7 Brad Buckingham 2016-05-16 12:39:21 UTC
*** Bug 1335750 has been marked as a duplicate of this bug. ***

Comment 9 Lukas Pramuk 2016-05-27 14:09:57 UTC
VERIFIED.

@Sat-6.2.0-Snap13.1

# satellite-installer -S satellite --upgrade 
Upgrading...
Upgrade Step: stop_services...
Upgrade Step: start_databases...
Upgrade Step: update_http_conf...
Upgrade Step: migrate_pulp...
Upgrade Step: fix_pulp_httpd_conf...
Upgrade Step: start_httpd...
Upgrade Step: start_qpidd...
Upgrade Step: start_pulp...
Upgrade Step: migrate_candlepin...
Upgrade Step: start_tomcat...
Upgrade Step: fix_katello_settings_file...
Upgrade Step: migrate_foreman...
Upgrade Step: migrate_gutterball...
Upgrade Step: remove_nodes_distributors...
Upgrade Step: Running installer...
...

>>> migrate_foreman step succeeded

Comment 10 Bryan Kearney 2016-07-27 11:43:06 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


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