Project

General

Profile

Actions

Bug #15749

closed

undefined method [] for nil:NilClass related to activation_key pool association

Added by Justin Sherrill almost 8 years ago. Updated almost 6 years ago.

Status:
Closed
Priority:
Normal
Category:
-
Target version:
Difficulty:
easy
Triaged:
Fixed in Releases:
Found in Releases:

Description

Various actions that index pools seem to be causing errors at various points such as importing a manifest or removing a consumer. Here is the traceback:


NoMethodError: undefined method `[]' for nil:NilClass
Backtrace:
/opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.0.2/app/models/katello/glue/candlepin/pool.rb:127:in `block (2 levels) in create_activation_key_associations'
/opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.0.2/app/models/katello/glue/candlepin/pool.rb:127:in `any?'
/opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.0.2/app/models/katello/glue/candlepin/pool.rb:127:in `block in create_activation_key_associations'
/opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.0.2/app/models/katello/glue/candlepin/pool.rb:126:in `collect'
/opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.0.2/app/models/katello/glue/candlepin/pool.rb:126:in `create_activation_key_associations'
/opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.0.2/app/models/katello/glue/candlepin/pool.rb:117:in `import_data'
/opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.0.2/app/lib/actions/katello/host/destroy.rb:48:in `block in finalize'
/opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.0.2/app/lib/actions/katello/host/destroy.rb:46:in `each'
/opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.0.2/app/lib/actions/katello/host/destroy.rb:46:in `finalize'
/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-0.8.11/lib/dynflow/action.rb:528:in `block (2 levels) in execute_finalize'
/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-0.8.11/lib/dynflow/middleware/stack.rb:26:in `call'

It has been reported in the wild, and seems to indicate that Candlepin is returning data that looks like:

{'pools' => [{}]}

when we're expecting either:

{'pools' => []}

or

{'pools' => [{'pool => {'id' => X}}]}

When requesting the data, we've never been able to capture that output

Actions #1

Updated by The Foreman Bot almost 8 years ago

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

Updated by Justin Sherrill almost 8 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100
Actions #3

Updated by Justin Sherrill almost 8 years ago

  • translation missing: en.field_release set to 143
Actions #4

Updated by Justin Sherrill almost 8 years ago

  • translation missing: en.field_release changed from 143 to 171
Actions #5

Updated by Eric Helms over 7 years ago

  • translation missing: en.field_release changed from 171 to 162
Actions

Also available in: Atom PDF