Bug #25399
closedKatello upgrade from 3.8 to 3.9 fails at db:migrate
Description
Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1646988
Description of problem:
Satellite upgrade from 6.4 to 6.5 failed on Sync Plan
Version-Release number of selected component (if applicable):
How reproducible:
always
Steps to Reproduce:
1. Make sure you have 6.4 satellite installed
2.Create Sync Plans
3.Assigned them to products
4.Upgrade Satellite from 6.4 to 6.5
Actual results:
Upgrade should work
Expected results:
upgrade failed on the step of sync plan migration
Additional info:
added logs
Minilog :
StandardError: An error has occurred, this and all later migrations canceled:
undefined method `cron_expression' for #<Katello::SyncPlan:0x0000000010102808>
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/activemodel-5.2.1/lib/active_model/attribute_methods.rb:430:in `method_missing'
/opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.9.0.rc2/app/models/katello/sync_plan.rb:70:in `associate_recurring_logic'
/opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.9.0.rc2/db/migrate/20180814202747_add_recurring_logic_to_sync_plan.rb:7:in `block (2 levels) in change'
/usr/share/foreman/app/models/concerns/foreman/thread_session.rb:100:in `as'
/usr/share/foreman/app/models/concerns/foreman/thread_session.rb:106:in `as_anonymous_admin'
/opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.9.0.rc2/db/migrate/20180814202747_add_recurring_logic_to_sync_plan.rb:6:in `block in change'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/activerecord-5.2.1/lib/active_record/relation/batches.rb:70:in `block (2 levels) in find_each'
Tasks: TOP => db:migrate
(See full trace by running task with --trace)
20180814202747 AddRecurringLogicToSyncPlan: migrating ====================
-- add_column(:katello_sync_plans, :foreman_tasks_recurring_logic_id, :integer)
> 0.0020s add_foreign_key(:katello_sync_plans, :foreman_tasks_recurring_logics, {:name=>"katello_sync_plan_foreman_tasks_recurring_logic_fk", :column=>"foreman_tasks_recurring_logic_id"})
-
-> 0.0044s
foreman-rake db:migrate failed! Check the output for error!
Updated by Samir Jha over 6 years ago
- Subject changed from Satellite upgrade from 6.4 to 6.5 failed at db:migrate to Katello upgrade from 3.8 to 3.9 fails at db:migrate
- Assignee set to Samir Jha
- Target version set to Katello 3.9.0
Updated by The Foreman Bot over 6 years ago
- Status changed from New to Ready For Testing
- Pull request https://github.com/Katello/katello/pull/7813 added
Updated by Anonymous over 6 years ago
- Status changed from Ready For Testing to Closed
Applied in changeset katello|d303f34f699905a8236fe7e0c7e57793e20bb04f.