Created attachment 1161484 [details] upgrade log migration error Description of problem: The Satellite upgrade fails when there is a capsule installed and a repo synced. /Stage[main]/Foreman::Database/Foreman::Rake[db:seed]/Exec[foreman-rake-db:seed]: Failed to call refresh: /usr/sbin/foreman-rake db:seed returned 1 instead of one of [0] /Stage[main]/Foreman::Database/Foreman::Rake[db:seed]/Exec[foreman-rake-db:seed]: /usr/sbin/foreman-rake db:seed returned 1 instead of one of [0] Version-Release number of selected component (if applicable): 6.1 > 6.2 upgrade How reproducible: Always Steps to Reproduce: 1. Install Satellite 6.1 2. Install a capsule 3. Sync a repo 4. Upgrade to 6.2 Actual results: Upgrade fails Expected results: upgrade succeeds Additional info: I had one zoo repo synced to the Satellite. I also attached an excerpt from the log where I believe the issue is, it looks like the migration fails, which makes it so there is pending migrations on the seeds step.
Created redmine issue http://projects.theforeman.org/issues/15184 from this bug
*** Bug 1339763 has been marked as a duplicate of this bug. ***
After fixing the error above, there was another error in MigrateContentHosts, then another and another...etc. Since all of them needed to be fixed in order to have the migration succeed, they are all being included with this bug. Refer to the PR for the full details: https://github.com/Katello/katello/pull/6066
Refer to bug 1339763 for a couple of those additional errors.
Upstream Katello PR: https://github.com/Katello/katello/pull/6066
*** Bug 1340614 has been marked as a duplicate of this bug. ***
An additional error was observed with the ContentHostMigration; therefore, we'll address it with this same bug. The error is: "Could not find the inverse association for content_facet_repositories" The fix will be submitted upstream with: http://projects.theforeman.org/issues/15239
Additional errors observed with the ContentHostMigration; therefore, addressing them with this same bug. The errors below occurred when upgrading a Satellite that had a Capsule with a host (not in an org) and content host (in an org) Error 1: uninitialized constant MigrateContentHosts::SmartProxy::MigrateContentHosts::ContentHost/opt/rh/rh-ror41/root/usr/share/gems/gems/activerecord-4.1.5/lib/active_record/inheritance.rb:133:in `compute_type' Error 2: can't modify frozen Hash/opt/rh/rh-ror41/root/usr/share/gems/gems/activerecord-4.1.5/lib/active_record/attribute_methods/write.rb:91:in `write_attribute_with_type_cast' The fix is submitted upstream with: http://projects.theforeman.org/issues/15255
*** Bug 1340197 has been marked as a duplicate of this bug. ***
Verified with upgrade from sat6.1.9 -> sat6.2 GA snap14.2 on rhel7. Upgrade was successfully completed. I don't see any issue with migration step. Also this bz points to different migration issues and I believe all of them are fixed. For me upgrade was completed successfully without any issue. SATELLITE UPGRADE started at: Fri Jun 3 02:18:11 2016 [qe-sat6-upgrade-rhel7.satqe.lab.eng.rdu2.redhat.com] run: satellite-installer --scenario satellite --upgrade [qe-sat6-upgrade-rhel7.satqe.lab.eng.rdu2.redhat.com] out: Upgrading... [qe-sat6-upgrade-rhel7.satqe.lab.eng.rdu2.redhat.com] out: Upgrade Step: stop_services... [qe-sat6-upgrade-rhel7.satqe.lab.eng.rdu2.redhat.com] out: Upgrade Step: start_databases... [qe-sat6-upgrade-rhel7.satqe.lab.eng.rdu2.redhat.com] out: Upgrade Step: update_http_conf... [qe-sat6-upgrade-rhel7.satqe.lab.eng.rdu2.redhat.com] out: Upgrade Step: migrate_pulp... [qe-sat6-upgrade-rhel7.satqe.lab.eng.rdu2.redhat.com] out: Upgrade Step: fix_pulp_httpd_conf... [qe-sat6-upgrade-rhel7.satqe.lab.eng.rdu2.redhat.com] out: Upgrade Step: start_httpd... [qe-sat6-upgrade-rhel7.satqe.lab.eng.rdu2.redhat.com] out: Upgrade Step: start_qpidd... [qe-sat6-upgrade-rhel7.satqe.lab.eng.rdu2.redhat.com] out: Upgrade Step: start_pulp... [qe-sat6-upgrade-rhel7.satqe.lab.eng.rdu2.redhat.com] out: Upgrade Step: migrate_candlepin... [qe-sat6-upgrade-rhel7.satqe.lab.eng.rdu2.redhat.com] out: Upgrade Step: start_tomcat... [qe-sat6-upgrade-rhel7.satqe.lab.eng.rdu2.redhat.com] out: Upgrade Step: fix_katello_settings_file... [qe-sat6-upgrade-rhel7.satqe.lab.eng.rdu2.redhat.com] out: Upgrade Step: migrate_foreman... [qe-sat6-upgrade-rhel7.satqe.lab.eng.rdu2.redhat.com] out: Upgrade Step: remove_nodes_distributors... [qe-sat6-upgrade-rhel7.satqe.lab.eng.rdu2.redhat.com] out: Upgrade Step: Running installer... Done [100%] []Installing Done [100%] [] [qe-sat6-upgrade-rhel7.satqe.lab.eng.rdu2.redhat.com] out: The full log is at /var/log/foreman-installer/satellite.log [qe-sat6-upgrade-rhel7.satqe.lab.eng.rdu2.redhat.com] out: Upgrade Step: restart_services... [qe-sat6-upgrade-rhel7.satqe.lab.eng.rdu2.redhat.com] out: Upgrade Step: db_seed... [qe-sat6-upgrade-rhel7.satqe.lab.eng.rdu2.redhat.com] out: Upgrade Step: import_package_groups (this may take a while) ... [qe-sat6-upgrade-rhel7.satqe.lab.eng.rdu2.redhat.com] out: Upgrade Step: import_rpms (this may take a while) ... [qe-sat6-upgrade-rhel7.satqe.lab.eng.rdu2.redhat.com] out: Upgrade Step: import_distributions (this may take a while) ... [qe-sat6-upgrade-rhel7.satqe.lab.eng.rdu2.redhat.com] out: Upgrade Step: import_puppet_modules (this may take a while) ... [qe-sat6-upgrade-rhel7.satqe.lab.eng.rdu2.redhat.com] out: Upgrade Step: import_subscriptions (this may take a while) ... [qe-sat6-upgrade-rhel7.satqe.lab.eng.rdu2.redhat.com] out: Upgrade Step: elasticsearch_message... [qe-sat6-upgrade-rhel7.satqe.lab.eng.rdu2.redhat.com] out: Elasticsearch has been removed as a dependency. The database files can be removed manually with #rm -rf /var/lib/elasticsearch. Some packages are no longer needed and can be removed: #rpm -e ruby193-rubygem-tire tfm-rubygem-tire elasticsearch sigar-java sigar snappy-java lucene4-contrib lucene4 [qe-sat6-upgrade-rhel7.satqe.lab.eng.rdu2.redhat.com] out: Upgrade Step: remove_docker_v1_content (this may take a while) ... [qe-sat6-upgrade-rhel7.satqe.lab.eng.rdu2.redhat.com] out: Upgrade Step: remove_gutterball... [qe-sat6-upgrade-rhel7.satqe.lab.eng.rdu2.redhat.com] out: Katello upgrade completed! [qe-sat6-upgrade-rhel7.satqe.lab.eng.rdu2.redhat.com] out: SATELLITE UPGRADE finished at: Fri Jun 3 03:07:19 2016
Just to correct: Verification is done with upgrade from sat6.1.9 -> sat6.2 GA snap14.1 on rhel7. Rpm version is 14.2 satellite-6.2.0-14.2.el7sat.noarch
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