Project

General

Profile

Bug #25287

Upgrade fromis failing on foreman-rake katello:import_subscriptions

Added by Justin Sherrill 9 months ago. Updated 9 months ago.

Status:
Closed
Priority:
Normal
Category:
Candlepin
Target version:
Difficulty:
Triaged:
Yes
Bugzilla link:
Team Backlog:
Fixed in Releases:
Found in Releases:

Description

Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1642088

Description of problem:

Upgrading fails on

/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activesupport-5.1.6/lib/active_support/message_encryptor.rb:22: warning: previous definition of DEFAULT_CIPHER was here
rake aborted!
NoMethodError: undefined method `[]' for nil:NilClass
/opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.7.0.41/app/lib/katello/resources/candlepin/product.rb:13:in `block in find_for_stacking_id'
/opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.7.0.41/app/lib/katello/resources/candlepin/product.rb:12:in `each'
/opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.7.0.41/app/lib/katello/resources/candlepin/product.rb:12:in `find_for_stacking_id'
/opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.7.0.41/app/models/katello/glue/candlepin/pool.rb:48:in `stacking_subscription'
/opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.7.0.41/app/models/katello/glue/candlepin/pool.rb:104:in `import_data'
/opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.7.0.41/app/models/katello/glue/candlepin/candlepin_object.rb:44:in `block (2 levels) in import_all'
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activerecord-5.1.6/lib/active_record/relation/delegation.rb:39:in `each'
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activerecord-5.1.6/lib/active_record/relation/delegation.rb:39:in `each'
/opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.7.0.41/app/models/katello/glue/candlepin/candlepin_object.rb:42:in `block in import_all'
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activerecord-5.1.6/lib/active_record/relation/delegation.rb:39:in `each'
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activerecord-5.1.6/lib/active_record/relation/delegation.rb:39:in `each'
/opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.7.0.41/app/models/katello/glue/candlepin/candlepin_object.rb:38:in `import_all'
/opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.7.0.41/lib/katello/tasks/import_subscriptions.rake:6:in `block (2 levels) in <top (required)>'
/opt/rh/rh-ruby24/root/usr/share/gems/gems/rake-12.0.0/exe/rake:27:in `<top (required)>'
Tasks: TOP => katello:import_subscriptions
(See full trace by running task with --trace)
Importing Subscriptions
foreman-rake katello:import_subscriptions failed! Check the output for error!
Upgrade step set_upstream_pool_id failed. Check logs for more information.

Running foreman-rake console command Katello::Pool.import_all fails on

irb(main):003:0> Katello::Pool.import_all
NoMethodError: undefined method `[]' for nil:NilClass
from katello (3.7.0.41) app/lib/katello/resources/candlepin/product.rb:13:in `block in find_for_stacking_id'
from katello (3.7.0.41) app/lib/katello/resources/candlepin/product.rb:12:in `each'
from katello (3.7.0.41) app/lib/katello/resources/candlepin/product.rb:12:in `find_for_stacking_id'
from katello (3.7.0.41) app/models/katello/glue/candlepin/pool.rb:48:in `stacking_subscription'
from katello (3.7.0.41) app/models/katello/glue/candlepin/pool.rb:104:in `import_data'
from katello (3.7.0.41) app/models/katello/glue/candlepin/candlepin_object.rb:44:in `block (2 levels) in import_all'
from katello (3.7.0.41) app/models/katello/glue/candlepin/candlepin_object.rb:42:in `block in import_all'
from katello (3.7.0.41) app/models/katello/glue/candlepin/candlepin_object.rb:38:in `import_all'
from (irb):3
from lib/tasks/console.rake:5:in `block in <top (required)>'

Associated revisions

Revision 45d437d5 (diff)
Added by Justin Sherrill 9 months ago

Fixes #25287 - fix incorrect rails autoload

under some conditions, in production this Subscription class
was being referenced and rails was loading the model, which
has the same method on it, returning different results

History

#1 Updated by Justin Sherrill 9 months ago

  • Assignee set to Justin Sherrill
  • Description updated (diff)
  • Subject changed from Upgrade from 6.3.4 to 6.4 is failing on foreman-rake katello:import_subscriptions to Upgrade fromis failing on foreman-rake katello:import_subscriptions

#2 Updated by The Foreman Bot 9 months ago

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

#3 Updated by John Mitsch 9 months ago

  • Triaged changed from No to Yes
  • Target version set to Katello 3.10.0

#4 Updated by Justin Sherrill 9 months ago

  • Status changed from Ready For Testing to Closed

Also available in: Atom PDF