Actions
Bug #15749
closedundefined method [] for nil:NilClass related to activation_key pool association
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
Updated by The Foreman Bot over 8 years ago
- Status changed from New to Ready For Testing
- Pull request https://github.com/Katello/katello/pull/6195 added
Updated by Justin Sherrill over 8 years ago
- Status changed from Ready For Testing to Closed
- % Done changed from 0 to 100
Applied in changeset katello|946f3c771d16ca0491b765fc34d222728364b90f.
Updated by Justin Sherrill over 8 years ago
- Translation missing: en.field_release set to 143
Updated by Justin Sherrill over 8 years ago
- Translation missing: en.field_release changed from 143 to 171
Updated by Eric Helms over 8 years ago
- Translation missing: en.field_release changed from 171 to 162
Actions