Project

General

Profile

Actions

Bug #15292

closed

[upgrade] Capsule sync failed with error: undefined method `[]' for nil:NilClass (NoMethodError)

Added by Justin Sherrill over 8 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Urgent
Category:
Upgrades
Target version:
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1342528
Description of problem:
I was trying to perform capsule sync from upgrade satellite from 6.1.9 -> 6.2 snap14.1 and it failed with error:

2016-06-03 08:16:36 [app] [I] Started POST "/katello/api/capsules/2/content/sync" for ::1 at 2016-06-03 08:16:36 -0400
2016-06-03 08:16:36 [app] [I] Processing by Katello::Api::V2::CapsuleContentController#sync as JSON
2016-06-03 08:16:36 [app] [I] Parameters: {"api_version"=>"v2", "id"=>"2", "capsule_content"=>{}}
2016-06-03 08:16:36 [app] [I] Authorized user admin(Admin User)
2016-06-03 08:16:37 [app] [I] Started GET "/foreman_tasks/tasks/f5dd6601-e230-4f35-9a15-f90e57ed3e4c" for 10.65.223.218 at 2016-06-03 08:16:37 -0400
2016-06-03 08:16:37 [app] [I] Processing by ForemanTasks::TasksController#show as HTML
2016-06-03 08:16:37 [app] [I] Parameters: {"id"=>"f5dd6601-e230-4f35-9a15-f90e57ed3e4c"}
2016-06-03 08:16:37 [foreman-tasks/action] [E] undefined method `[]' for nil:NilClass (NoMethodError) | /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.0.0.42/app/lib/actions/katello/capsule_content/sync.rb:84:in `block in repos_needing_importer_updates' | /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.0.0.42/app/lib/actions/katello/capsule_content/sync.rb:81:in `select' | /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.0.0.42/app/lib/actions/katello/capsule_content/sync.rb:81:in `repos_needing_importer_updates' | /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.0.0.42/app/lib/actions/katello/capsule_content/sync.rb:64:in `repos_needing_updates' | /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.0.0.42/app/lib/actions/katello/capsule_content/sync.rb:22:in `plan' | /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-0.8.11/lib/dynflow/action.rb:461:in `block (3 levels) in execute_plan' | /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-0.8.11/lib/dynflow/middleware/stack.rb:26:in `call' | /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-0.8.11/lib/dynflow/middleware/stack.rb:26:in `pass' | /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-0.8.11/lib/dynflow/middleware.rb:17:in `pass' | /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-0.8.11/lib/dynflow/middleware.rb:34:in `plan' | /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-0.8.11/lib/dynflow/middleware/stack.rb:22:in `call' | /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-0.8.11/lib/dynflow/middleware/stack.rb:26:in `pass' | /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-0.8.11/lib/dynflow/middleware.rb:17:in `pass' | /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-0.8.11/lib/dynflow/middleware.rb:34:in `plan' | /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-0.8.11/lib/dynflow/middleware/stack.rb:22:in `call' | /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-0.8.11/lib/dynflow/middleware/world.rb:30:in `execute' | /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-0.8.11/lib/dynflow/action.rb:460:in `block (2 levels) in execute_plan' | /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-0.8.11/lib/dynflow/execution_plan.rb:281:in `call' | /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-0.8.11/lib/dynflow/execution_plan.rb:281:in `switch_flow' | /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-0.8.11/lib/dynflow/action.rb:364:in `concurrence' | /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-0.8.11/lib/dynflow/action.rb:459:in `block in execute_plan'

Please note that satellite upgrade was completed successfully and capsule upgrade too if we specify "--pulp-oauth-secret" with installer.

Upgrading...
Upgrade Step: stop_services...
Upgrade Step: start_databases...
Upgrade Step: update_http_conf...
Upgrade Step: migrate_pulp...
Upgrade Step: fix_pulp_httpd_conf...
Upgrade Step: start_httpd...
Upgrade Step: start_qpidd...
Upgrade Step: start_pulp...
Upgrade Step: remove_nodes_importers...
Upgrade Step: Running installer...
Installing Done [100%] [..................................................................]
The full log is at /var/log/foreman-installer/capsule.log
Upgrade Step: restart_services...
Katello upgrade completed!

Version-Release number of selected component (if applicable):
upgraded setup from 6.1.9 -> 6.2 GA snap14.1

How reproducible:

Steps to Reproduce:
1. capsule sync
2.
3.

Actual results:
~]# hammer -u admin -p changeme capsule content synchronize --id=2
Could not synchronize capsule content:
undefined method `[]' for nil:NilClass

Expected results:
sync should work

Additional info:

Actions #1

Updated by The Foreman Bot over 8 years ago

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

Updated by Justin Sherrill over 8 years ago

  • Priority changed from Normal to Urgent
  • Translation missing: en.field_release set to 86

Marking this as urgent as this has some dire consequences for capsule syncing.

Actions #3

Updated by Justin Sherrill over 8 years ago

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

Also available in: Atom PDF