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 2256136 - When applying errata on host using "apply via custom remote execution" => "katello via ansible" method shows errata field blank
Summary: When applying errata on host using "apply via custom remote execution" => "ka...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Errata Management
Version: 6.15.0
Hardware: All
OS: Linux
high
medium
Target Milestone: 6.15.0
Assignee: Jeremy Lenz
QA Contact: David Moore
URL:
Whiteboard:
: 2256170 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-12-28 20:56 UTC by Prashant Waghmare
Modified: 2024-04-23 17:16 UTC (History)
9 users (show)

Fixed In Version: rubygem-katello-4.11.0.4-1
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2024-04-23 17:16:44 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
errata_field_blank.png (62.30 KB, image/png)
2023-12-28 20:56 UTC, Prashant Waghmare
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 37051 0 High New When applying errata on host using "apply via custom remote execution" => "katello via ansible" method shows errata fie... 2024-01-12 20:25:35 UTC
Red Hat Issue Tracker SAT-22173 0 None None None 2023-12-28 20:57:05 UTC
Red Hat Product Errata RHSA-2024:2010 0 None None None 2024-04-23 17:16:46 UTC

Description Prashant Waghmare 2023-12-28 20:56:09 UTC
Created attachment 2006403 [details]
errata_field_blank.png

Description of problem:

When applying errata on host using "apply via custom remote execution" => "katello via ansible" method shows  errata field blank

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

satellite 6.15

How reproducible:

Always

Steps to Reproduce:

1. Login to satellite web-ui => click on "hosts" => content hosts => click on hosts on which need to apply errata => select errata need to apply =>  from drop down arrow of "Apply" select "Apply via customized remote execution" => select job category as "Katello via ansible" => click "Next" => Here "errata" field shows blank.


Actual results:

"errata" field shows blank.

Expected results:

"errata" field should show selected errata for application.

Additional info:

attaching the screenshot.

Comment 5 Adam Ruzicka 2024-01-03 13:21:05 UTC
Ok, so there are two things at play here.

A) "Apply via customized remote execution" uses "Install errata by search query - Katello Script Default" job template by default. This job template has "Errata search query" input. In #0 you selected "Install Errata - Katello Ansible Default" job template, but this job template has "errata" input instead of "Errata search query" input. Because of the different input names, the value becomes blank. Also note that one is in search query format while the other a comma separated list of erratas so even if we resolved the naming conflict, the values themselves wouldn't be compatible.

B) When job template is changed, the values of all inputs which were previously set but don't exist in the new template are removed. When you change category, it automatically selects first template in that category, which might cause the input values to be dropped even if you then subsequently change the template to a one with compatible inputs.

Solution for A would involve having a new job template in katello - an ansible flavor of "Install Errata - Katello Ansible Default".
Solution for B would probably mean pruning the invalid inputs before submit instead of on template change.

I'd suggest splitting the two cases into two BZs (let A have this BZ and file a new one for B).

@jlenz Does the above sound reasonable and if so, would you mind taking one of the parts?

Comment 6 Jeremy Lenz 2024-01-03 14:45:01 UTC
Yeah, we didn't really cover the 'Katello Ansible Default' templates when designing the new host UI. Currently it only supports Script.

Would having a new template with the same inputs be enough? I'm happy to look into contributing that. We'd also have to do the same with our other "by search query" job templates.

I can also imagine a setting so you could default to either script or ansible templates when customizing REX via UI, but not sure if that's needed or makes it too complex.

Comment 7 Ian Ballou 2024-01-10 23:00:41 UTC
Potential duplicate or at least related RFE: https://bugzilla.redhat.com/show_bug.cgi?id=2256170

Comment 9 Adam Ruzicka 2024-01-11 09:16:35 UTC
> Would having a new template with the same inputs be enough?

Probably not to resolve the exact case that is described in #0. Maybe it would work, depending on the name on the template (ie. if it would get selected by default when changing category), but we can't really rely on that.

> I can also imagine a setting so you could default to either script or ansible templates when customizing REX via UI

Remote Execution Features can be used to map a different job template to an action like "Apply errata", If we had apply errata by search query with ansible, then the case in #0 may or may not work, but this mechanism could be used to switch which template is used without having to mess with it in the job form.

Comment 10 Jeremy Lenz 2024-01-12 20:25:34 UTC
Created redmine issue https://projects.theforeman.org/issues/37051 from this bug

Comment 11 Bryan Kearney 2024-01-13 00:03:17 UTC
Upstream bug assigned to jlenz

Comment 12 Bryan Kearney 2024-01-13 00:03:20 UTC
Upstream bug assigned to jlenz

Comment 16 Dana Singleterry 2024-02-14 13:39:45 UTC
*** Bug 2256170 has been marked as a duplicate of this bug. ***

Comment 19 errata-xmlrpc 2024-04-23 17:16:44 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.15.0 release), 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-2024:2010


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