Hide Forgot
Description of problem: If in Satellite there are tasks that are in state: 'planning' invoking foreman-rake foreman_tasks:export_tasks will fails. Version-Release number of selected component (if applicable): experienced with: tfm-rubygem-foreman-tasks-0.7.14.14-1.el7sat.noarch but expecting this to be valid also on later versions. How reproducible: always Steps to Reproduce: 1. have something that crash a task in the planning phase (like an OutOfSpace of the FileSystem) 2. foreman-rake foreman_tasks:export_tasks 3. wait a loooong time for having t Actual results: rake aborted! NoMethodError: undefined method `state' for nil:NilClass /opt/theforeman/tfm/root/usr/share/gems/gems/foreman-tasks-0.7.14.14/lib/foreman_tasks/tasks/export_tasks.rake:165:in `step_css_class' /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-0.8.13.6/web/views/plan_step.erb:4:in `block in singleton class' /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-0.8.13.6/web/views/plan_step.erb:-5:in `instance_eval' /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-0.8.13.6/web/views/plan_step.erb:-5:in `singleton class' /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-0.8.13.6/web/views/plan_step.erb:-7:in `__tilt_18397580' /opt/rh/rh-ror41/root/usr/share/gems/gems/tilt-1.4.1/lib/tilt/template.rb:170:in `call' /opt/rh/rh-ror41/root/usr/share/gems/gems/tilt-1.4.1/lib/tilt/template.rb:170:in `evaluate' /opt/rh/rh-ror41/root/usr/share/gems/gems/tilt-1.4.1/lib/tilt/template.rb:103:in `render' /opt/theforeman/tfm/root/usr/share/gems/gems/foreman-tasks-0.7.14.14/lib/foreman_tasks/tasks/export_tasks.rake:61:in `erb' /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-0.8.13.6/web/views/plan_step.erb:12:in `block (2 levels) in singleton class' /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-0.8.13.6/web/views/plan_step.erb:11:in `each' /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-0.8.13.6/web/views/plan_step.erb:11:in `block in singleton class' /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-0.8.13.6/web/views/plan_step.erb:-5:in `instance_eval' /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-0.8.13.6/web/views/plan_step.erb:-5:in `singleton class' /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-0.8.13.6/web/views/plan_step.erb:-7:in `__tilt_18397580' /opt/rh/rh-ror41/root/usr/share/gems/gems/tilt-1.4.1/lib/tilt/template.rb:170:in `call' /opt/rh/rh-ror41/root/usr/share/gems/gems/tilt-1.4.1/lib/tilt/template.rb:170:in `evaluate' /opt/rh/rh-ror41/root/usr/share/gems/gems/tilt-1.4.1/lib/tilt/template.rb:103:in `render' /opt/theforeman/tfm/root/usr/share/gems/gems/foreman-tasks-0.7.14.14/lib/foreman_tasks/tasks/export_tasks.rake:61:in `erb' /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-0.8.13.6/web/views/show.erb:48:in `block in singleton class' /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-0.8.13.6/web/views/show.erb:-5:in `instance_eval' /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-0.8.13.6/web/views/show.erb:-5:in `singleton class' /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-0.8.13.6/web/views/show.erb:-7:in `__tilt_18397580' /opt/rh/rh-ror41/root/usr/share/gems/gems/tilt-1.4.1/lib/tilt/template.rb:170:in `call' /opt/rh/rh-ror41/root/usr/share/gems/gems/tilt-1.4.1/lib/tilt/template.rb:170:in `evaluate' /opt/rh/rh-ror41/root/usr/share/gems/gems/tilt-1.4.1/lib/tilt/template.rb:103:in `render' /opt/theforeman/tfm/root/usr/share/gems/gems/foreman-tasks-0.7.14.14/lib/foreman_tasks/tasks/export_tasks.rake:61:in `erb' /opt/theforeman/tfm/root/usr/share/gems/gems/foreman-tasks-0.7.14.14/lib/foreman_tasks/tasks/export_tasks.rake:46:in `render_task' /opt/theforeman/tfm/root/usr/share/gems/gems/foreman-tasks-0.7.14.14/lib/foreman_tasks/tasks/export_tasks.rake:264:in `block (5 levels) in <top (required)>' /opt/theforeman/tfm/root/usr/share/gems/gems/foreman-tasks-0.7.14.14/lib/foreman_tasks/tasks/export_tasks.rake:264:in `open' /opt/theforeman/tfm/root/usr/share/gems/gems/foreman-tasks-0.7.14.14/lib/foreman_tasks/tasks/export_tasks.rake:264:in `block (4 levels) in <top (required)>' /opt/rh/rh-ror41/root/usr/share/gems/gems/activerecord-4.1.5/lib/active_record/relation/delegation.rb:132:in `each' /opt/rh/rh-ror41/root/usr/share/gems/gems/activerecord-4.1.5/lib/active_record/relation/delegation.rb:132:in `each_with_index' /opt/rh/rh-ror41/root/usr/share/gems/gems/activerecord-4.1.5/lib/active_record/relation/delegation.rb:132:in `public_send' /opt/rh/rh-ror41/root/usr/share/gems/gems/activerecord-4.1.5/lib/active_record/relation/delegation.rb:132:in `method_missing' /opt/rh/rh-ror41/root/usr/share/gems/gems/activerecord-4.1.5/lib/active_record/relation/delegation.rb:99:in `method_missing' /opt/theforeman/tfm/root/usr/share/gems/gems/foreman-tasks-0.7.14.14/lib/foreman_tasks/tasks/export_tasks.rake:263:in `block (3 levels) in <top (required)>' /opt/rh/rh-ruby22/root/usr/share/ruby/tmpdir.rb:88:in `mktmpdir' /opt/theforeman/tfm/root/usr/share/gems/gems/foreman-tasks-0.7.14.14/lib/foreman_tasks/tasks/export_tasks.rake:256:in `block (2 levels) in <top (required)>' /opt/rh/rh-ruby22/root/usr/share/gems/gems/rake-10.4.2/lib/rake/task.rb:240:in `call' /opt/rh/rh-ruby22/root/usr/share/gems/gems/rake-10.4.2/lib/rake/task.rb:240:in `block in execute' /opt/rh/rh-ruby22/root/usr/share/gems/gems/rake-10.4.2/lib/rake/task.rb:235:in `each' /opt/rh/rh-ruby22/root/usr/share/gems/gems/rake-10.4.2/lib/rake/task.rb:235:in `execute' /opt/rh/rh-ruby22/root/usr/share/gems/gems/rake-10.4.2/lib/rake/task.rb:179:in `block in invoke_with_call_chain' /opt/rh/rh-ruby22/root/usr/share/ruby/monitor.rb:211:in `mon_synchronize' /opt/rh/rh-ruby22/root/usr/share/gems/gems/rake-10.4.2/lib/rake/task.rb:172:in `invoke_with_call_chain' /opt/rh/rh-ruby22/root/usr/share/gems/gems/rake-10.4.2/lib/rake/task.rb:165:in `invoke' /opt/rh/rh-ruby22/root/usr/share/gems/gems/rake-10.4.2/lib/rake/application.rb:150:in `invoke_task' /opt/rh/rh-ruby22/root/usr/share/gems/gems/rake-10.4.2/lib/rake/application.rb:106:in `block (2 levels) in top_level' /opt/rh/rh-ruby22/root/usr/share/gems/gems/rake-10.4.2/lib/rake/application.rb:106:in `each' /opt/rh/rh-ruby22/root/usr/share/gems/gems/rake-10.4.2/lib/rake/application.rb:106:in `block in top_level' /opt/rh/rh-ruby22/root/usr/share/gems/gems/rake-10.4.2/lib/rake/application.rb:115:in `run_with_threads' /opt/rh/rh-ruby22/root/usr/share/gems/gems/rake-10.4.2/lib/rake/application.rb:100:in `top_level' /opt/rh/rh-ruby22/root/usr/share/gems/gems/rake-10.4.2/lib/rake/application.rb:78:in `block in run' /opt/rh/rh-ruby22/root/usr/share/gems/gems/rake-10.4.2/lib/rake/application.rb:176:in `standard_exception_handling' /opt/rh/rh-ruby22/root/usr/share/gems/gems/rake-10.4.2/lib/rake/application.rb:75:in `run' /opt/rh/rh-ruby22/root/usr/bin/rake:33:in `<main>' Tasks: TOP => foreman_tasks:export_tasks Expected results: foreman_tasks:export_tasks could be smarter and being able to deal with that situation. Has this being addressed in future Additional info: This issue happen when a customer is already having trouble and is looking for help so it add stress to a stressed situation, so would be good to have it sorted out to users to provide support the task status.
*** This bug has been marked as a duplicate of bug 1501357 ***