Bug 2225090

Summary: Re-running apply errata remote execution task fails with error Validation failed: Template install errata - katello script default:.
Product: Red Hat Satellite Reporter: Susmita Sen <sussen>
Component: Remote ExecutionAssignee: Adam Ruzicka <aruzicka>
Status: ON_QA --- QA Contact: Peter Ondrejka <pondrejk>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.14.0CC: aruzicka, juwatts, pcreech, rlavi, zhunting
Target Milestone: 6.14.0Keywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: rubygem-foreman_remote_execution-10.0.6 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Susmita Sen 2023-07-24 09:54:31 UTC
Description of problem:

If apply errata task fails for some reason. After fixing the problem, click on the 'Rerun' button. After selecting the exact same and correct options when clicking 'Submit', it is failing with the below error on the top right corner.

"Validation failed: Template install errata by search query - katello script default: Input pre script: Value can't be blank, Input refresh subscription: Value can't be blank, Value is not included in the list, Input options: Value can't be blank, Input post script: Value can't be blank"

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

6.14.0

How reproducible:

Always

Steps to Reproduce:
1. Follow the below step and try to apply errata on a registered host.

Satellite WEB UI -> Hosts -> Content Hosts -> Click on the name -> Click on the Errata tab -> Select an errata -> Apply via Remote execution -> If it fails or passes.

2. Click on the 'rerun' button -> It'll ask you tore-check the options that were selected before -> Without changing anything, click on 'Submit' -> you'll see the below error.

"Validation failed: Template install errata - katello script default: Input pre script: Value can't be blank, Input refresh subscription: Value can't be blank, Value is not included in the list, Input options: Value can't be blank, Input post script: Value can't be blank"


Actual results:

It fails with an error.

Expected results:

It should run if it fails. Even if the errata is already applied still it should run and give message "'Nothing to do' Complete!"


Additional info:

1. I tested it on 2 satellite 6.14 machines.

2. I tested the same on satellite 6.12, and it is working as expected.

3. I tested it with other katello options, and it is working fine.

4. Even I manually ran the command following the below step without selecting any 'pre script'. Only this re-run option is not working.