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:
Created redmine issue http://projects.theforeman.org/issues/15292 from this bug
Moving to POST since upstream bug http://projects.theforeman.org/issues/15292 has been closed
Verified with upgrade from sat6.1.9 -> sat6.2 GA snap15.1 I created a new repo on upgrade satellite and published it in CV. Later initiated the capsule sync. Sync was completed successfully. ~]# hammer -u admin -p changeme capsule content synchronize --id=2 [......................................................................................................................................] [100%] [root@qe-sat6-upgrade-rhel7 ~]# on capsule node, I can see synced custom contents. # ll | wc -l 165 [root@qe-capsule-rhel7 capsule7]# pwd /var/lib/pulp/published/yum/https/repos/Default_Organization/DEV/rhel7_cv/custom/capsule/capsule7
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2016:1501