Bug 1404436
Summary: | Satellite 6.1.X -> 6.2.5 upgrade fails during db:migration | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | Red Hat Satellite | Reporter: | Mike McCune <mmccune> | ||||||||||
Component: | Upgrades | Assignee: | Tomer Brisker <tbrisker> | ||||||||||
Status: | CLOSED ERRATA | QA Contact: | jcallaha | ||||||||||
Severity: | urgent | Docs Contact: | |||||||||||
Priority: | unspecified | ||||||||||||
Version: | 6.2.5 | CC: | ahumbe, chrobert, dmoessne, egolov, ehelms, h.teunis, inecas, jcallaha, jko, mbacovsk, omaciel, oshtaier, sghai, tbrisker, tcarlin | ||||||||||
Target Milestone: | Unspecified | ||||||||||||
Target Release: | Unused | ||||||||||||
Hardware: | Unspecified | ||||||||||||
OS: | Unspecified | ||||||||||||
Whiteboard: | |||||||||||||
Fixed In Version: | foreman-1.11.0.61-1 | Doc Type: | If docs needed, set a value | ||||||||||
Doc Text: | Story Points: | --- | |||||||||||
Clone Of: | Environment: | ||||||||||||
Last Closed: | 2016-12-19 08:18:20 UTC | Type: | Bug | ||||||||||
Regression: | --- | Mount Type: | --- | ||||||||||
Documentation: | --- | CRM: | |||||||||||
Verified Versions: | Category: | --- | |||||||||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||||||
Cloudforms Team: | --- | Target Upstream Version: | |||||||||||
Embargoed: | |||||||||||||
Attachments: |
|
Description
Mike McCune
2016-12-13 20:50:39 UTC
Created redmine issue http://projects.theforeman.org/issues/17666 from this bug This appears to only effect 6.1 -> 6.2.5 upgrades. Going from 6.2.X -> 6.2.5 still functions fine. This also requires at least one hostgroup in the database before attempting 6.1->6.2.5 upgrade. *** HOTFIX PATCH *** For anyone wishing to work around this and complete an upgrade to 6.2.5 please perform the following: 1) Download attached patch from this BZ 2) copy to: /usr/share/foreman 3) Apply patch; # patch -p1 < 4109.patch patching file db/migrate/20140314004243_add_counter_caches.rb patching file db/migrate/20140318153157_fix_puppetclass_counters.rb patching file db/migrate/20151104100257_add_hosts_count_to_hostgroup.rb 4) continue your upgrade: satellite-installer --upgrade Created attachment 1231344 [details]
hotfix patch for Foreman
Upstream bug assigned to tbrisker Upstream bug assigned to tbrisker Issue is reproducible with 6.1.11 -> 6.2.5 and I created a hostgroup before upgrade. ---- Upgrade Step: fix_katello_settings_file... Upgrade Step: migrate_foreman... true rake aborted! StandardError: An error has occurred, this and all later migrations canceled: undefined method `counter_cache_column' for nil:NilClass/opt/rh/rh-ror41/root/usr/share/gems/gems/activerecord-4.1.5/lib/active_record/counter_cache.rb:33:in `block in reset_counters' /opt/rh/rh-ror41/root/usr/share/gems/gems/activerecord-4.1.5/lib/active_record/counter_cache.rb:22:in `each' /opt/rh/rh-ror41/root/usr/share/gems/gems/activerecord-4.1.5/lib/active_record/counter_cache.rb:22:in `reset_counters' /usr/share/foreman/db/migrate/20151104100257_add_hosts_count_to_hostgroup.rb:5: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/20151104100257_add_hosts_count_to_hostgroup.rb:4:in `up' Issue pointed in comment11 appears because I was trying to run installer from /usr/share/foreman. However, it ran successfully when I run it from `cd $HOME`. filed this bz to address this:https://bugzilla.redhat.com/show_bug.cgi?id=1404652 Applied patch from comment6 and ran "satellite-installer --scenario satellite --upgrade" from /root and upgrade was completed successfully. Please see the complete console logs. Created attachment 1231607 [details]
logs from console after applying patch and while running upgrade
Created attachment 1231909 [details]
good upgrade 1
attaching log from a good upgrade. satellite did have hostgroups.
Created attachment 1232434 [details]
full.log
Verified in Satellite 6.2.6 Snap 2
Completed a final upgrade with a fully populated satellite, to include multiple configured hostgroups, and hosts provisioned from those groups. Attaching the upgrade log to this update.
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:2958 |