Project

General

Profile

Actions

Bug #25399

closed

Katello upgrade from 3.8 to 3.9 fails at db:migrate

Added by Samir Jha over 5 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
High
Assignee:
Category:
Upgrades
Target version:
Difficulty:
Triaged:
Yes
Fixed in Releases:
Found in Releases:

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!

Actions #1

Updated by Samir Jha over 5 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
Actions #2

Updated by The Foreman Bot over 5 years ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/Katello/katello/pull/7813 added
Actions #3

Updated by Samir Jha over 5 years ago

  • Priority changed from Normal to High
Actions #4

Updated by Anonymous over 5 years ago

  • Status changed from Ready For Testing to Closed
Actions #5

Updated by Justin Sherrill over 5 years ago

  • Triaged changed from No to Yes
Actions

Also available in: Atom PDF