Actions
Bug #35315
closedMisleading error when REX fails to find pattern template invocation for a given provider
Status:
Closed
Priority:
Normal
Assignee:
Category:
Foreman
Target version:
Difficulty:
trivial
Triaged:
No
Description
Instead of explicitly telling so, it returns an array of providers instead of an template invocation and things blow up a bit later when we try to work with it.
NoMethodError: undefined method `host_id=' for ["SSH", "Script"]:Array /usr/share/gems/gems/foreman_remote_execution-7.1.0/app/lib/actions/remote_execution/run_hosts_job.rb:50:in `block in create_sub_plans' /usr/share/gems/gems/activerecord-6.0.4.7/lib/active_record/relation/delegation.rb:88:in `each' /usr/share/gems/gems/activerecord-6.0.4.7/lib/active_record/relation/delegation.rb:88:in `each' /usr/share/gems/gems/foreman_remote_execution-7.1.0/app/lib/actions/remote_execution/run_hosts_job.rb:46:in `map' /usr/share/gems/gems/foreman_remote_execution-7.1.0/app/lib/actions/remote_execution/run_hosts_job.rb:46:in `create_sub_plans' /usr/share/gems/gems/dynflow-1.6.4/lib/dynflow/action/with_sub_plans.rb:41:in `spawn_plans' /usr/share/gems/gems/dynflow-1.6.4/lib/dynflow/action/with_bulk_sub_plans.rb:71:in `spawn_plans' /usr/share/gems/gems/foreman_remote_execution-7.1.0/app/lib/actions/remote_execution/run_hosts_job.rb:56:in `spawn_plans' /usr/share/gems/gems/dynflow-1.6.4/lib/dynflow/action/with_sub_plans.rb:37:in `initiate' /usr/share/gems/gems/dynflow-1.6.4/lib/dynflow/action/with_bulk_sub_plans.rb:36:in `initiate' /usr/share/gems/gems/dynflow-1.6.4/lib/dynflow/action/with_polling_sub_plans.rb:24:in `initiate' /usr/share/gems/gems/foreman_remote_execution-7.1.0/app/lib/actions/remote_execution/run_hosts_job.rb:110:in `initiate'
Actions