Bug 2223891 - ERF42-4237 [Foreman::Exception]: Unknown input command for template Install Package - Katello Script Default, while customizing remote exucution job.
Summary: ERF42-4237 [Foreman::Exception]: Unknown input command for template Install P...
Keywords:
Status: VERIFIED
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Remote Execution
Version: 6.14.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: 6.14.0
Assignee: kmalyjur
QA Contact: Peter Ondrejka
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-07-19 08:07 UTC by Akshay Kapse
Modified: 2023-08-17 14:26 UTC (History)
4 users (show)

Fixed In Version: rubygem-foreman_remote_execution-10.0.6
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github theforeman foreman_remote_execution pull 831 0 None open Fixes #36633 - Fix "Unknown input command" error when submitting job 2023-08-09 09:14:03 UTC
Red Hat Issue Tracker SAT-19037 0 None None None 2023-07-19 10:41:45 UTC

Comment 1 Akshay Kapse 2023-07-19 08:08:42 UTC
Description of problem:
ERF42-4237 [Foreman::Exception]: Unknown input command for template Install Package - Katello Script Default, while customizing remote exucution job (via customized remote execution) to Enable Tracer through Satellite Web UI.


Version-Release number of selected component (if applicable):
Satellite 6.14

How reproducible:
100%

Steps to Reproduce:
1. Go to hosts page on Satellite Web Ui and click on 'Enable Traces' --> via customized remote execution job.
2. Edit the job template as:

Job category * :   Commands
Job template   :   Run Command - Script Default
Taget Hosts    :   hostname
command        :   yum install katello-host-tools-tracer


Actual results:
Could not submit the job due to pop up error:
~~~
ERF42-4237 [Foreman::Exception]: Unknown input command for template Install Package - Katello Script Default
~~~

Expected results:
This should not happen as Job template fields are updated.
I am able to submit the job using Hosts --> All Hosts --> Schedule Remote Execution path.

Additional info:
--- Attaching screenshot.

Comment 2 Adam Ruzicka 2023-07-19 10:40:50 UTC
Alternative steps to reproduce:
1) Go to /job_invocations/new?feature=run_script
2) Change job category to "packages" and job template to "Package Action - Script Default"
3) Fill in the rest of the wizard, submit

Actual results:
The wizard ignores the category and template selection sets job template id to nil and uses the original feature, but with the inputs from the template selected by the user. The request fails with "Unknown input action for template Run Command - Script Default".

2023-07-19T06:37:02 [I|app|65cf436d] Started POST "/api/job_invocations" for 192.168.122.1 at 2023-07-19 06:37:02 -0400
2023-07-19T06:37:02 [I|app|65cf436d] Processing by Api::V2::JobInvocationsController#create as JSON
2023-07-19T06:37:02 [I|app|65cf436d]   Parameters: {"location"=>{"id"=>2, "title"=>"Default Location"}, "organization"=>{"id"=>1, "title"=>"Default Organization"}, "job_invocation"=>{"job_template_id"=>nil, "targeting_type"=>"static_query", "inputs"=>{"action"=>"install", "package"=>"tmux", "pre_script"=>"", "options"=>"", "post_script"=>"", "refresh_subscription"=>""}, "ssh_user"=>nil, "ssh"=>{"effective_user"=>""}, "recurrence"=>nil, "scheduling"=>nil, "concurrency_control"=>{"time_span"=>"", "concurrency_level"=>""}, "bookmark_id"=>nil, "search_query"=>"id ^ (1)", "description_format"=>"%{action} package(s) %{package}", "execution_timeout_interval"=>"", "feature"=>"run_script", "time_to_pickup"=>""}, "apiv"=>"v2"}

Expected results:
It does the package action instead of trying to do the mix of the two.

Note:
A similar issue exists when you rerun a job and then change the category and template to a one which has different inputs.

Comment 6 Peter Ondrejka 2023-08-17 14:26:01 UTC
Verified on Satellite 6.14 snap 12


Note You need to log in before you can comment on or make changes to this bug.