Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
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: CLOSED ERRATA
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-11-08 14:20 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: 2023-11-08 14:19:57 UTC
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
Red Hat Product Errata RHSA-2023:6818 0 None None None 2023-11-08 14:20:05 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

Comment 9 errata-xmlrpc 2023-11-08 14:19:57 UTC
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 (Important: Satellite 6.14 security and bug fix update), 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/RHSA-2023:6818


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