Description of problem: Report Templates Host - Applied Errata report showing no data. While generating Report Templates "Host - Applied Errata report" file is empty. ~~~~~~~~~ Login to Satellite WEB UI > Monitor > Report Templates > Host - Applied Errata ~~~~~~~~ Version-Release number of selected component (if applicable): 6.8 How reproducible: 100% Steps to Reproduce: 1. // Generate Report: ~~~~~~~~~ Login to Satellite WEB UI > Monitor > Report Templates > Generate report for "Host - Applied Errata" 2. Generated report is empty. 3. Checked task "Actions::Katello::Host::Erratum::Install" for generated for applied errata on Satellite server but this task is also empty. ~~~~~~~~~ [root@satellite ~]# hammer task list --search="label = Actions::Katello::Host::Erratum::Install" ---|--------|-------|--------|------------|----------|-------|------------ ID | ACTION | STATE | RESULT | STARTED AT | ENDED AT | OWNER | TASK ERRORS ---|--------|-------|--------|------------|----------|-------|------------ ~~~~~~~~~ 4. Noticed task "Actions::Katello::Host::Erratum::ApplicableErrataInstall" is generated for applied errata. ~~~~~~~~~ [root@satellite ~]# hammer task list --search="label = Actions::Katello::Host::Erratum::ApplicableErrataInstall" -------------------------------------|-----------------------------------------------------------|---------|---------|---------------------|---------------------|---------|--------------------------------------------------------------------------------- ID | ACTION | STATE | RESULT | STARTED AT | ENDED AT | OWNER | TASK ERRORS -------------------------------------|-----------------------------------------------------------|---------|---------|---------------------|---------------------|---------|--------------------------------------------------------------------------------- 1111xaxa-8e70-xaxa-8bd9-23f091xxxxxx | Install Applicable Errata on Host1-example.com | stopped | success | 2021/03/20 10:47:15 | 2021/03/20 10:51:15 | admin | 3333xaxa-9945-2d5a-xaxa-1c8693xxxxxx | Install Applicable Errata on Host2-example.com | stopped | success | 2021/03/20 07:51:20 | 2021/03/20 07:56:20 | admin | 5555xbxb-dxxb-5e9a-xbxb-dz50b7xxxxxx | Install Applicable Errata on Host3-example.com | stopped | success | 2021/03/20 07:51:06 | 2021/03/20 07:50:06 | admin | -------------------------------------|-----------------------------------------------------------|---------|---------|---------------------|---------------------|---------|--------------------------------------------------------------------------------- [root@satellite ~]# ~~~~~~~~~ 5. Report is only consider task label "Actions::Katello::Host::Erratum::Install" where as report do not consider the task label "Actions::Katello::Host::Erratum::ApplicableErrataInstall" ~~~~~~~~ https://github.com/Katello/katello/blob/53e9d86ba155a175fb2efeec00e84c20702b6ca4/app/lib/katello/concerns/base_template_scope_extensions.rb#L110 ~~~~~~~~ Actual results: It does not contain any errata information in the Applied Errata report. Expected results: Host - Applied Errata report should contain the errata information.
Moving to Errata management, has this changed recently? If so, it needs to changed at https://github.com/Katello/katello/blob/b16e577c23c431bea930e86df27144ecac0e113c/app/lib/katello/concerns/base_template_scope_extensions.rb#L98-L165
I took a look into the codebase and it seems Actions::Katello::Host::Erratum::ApplicableErrataInstall is a wrapper around Actions::Katello::Host::Erratum::Install. The wrapper looks whether there's at least some applicable errata and if it's not, it does nothing. If there's is some, it will create Actions::Katello::Host::Erratum::Install for that. In this case, customer may see many Actions::Katello::Host::Erratum::ApplicableErrataInstall because they are regularly applying applicable erratas while there are no applicable errata to be applied. Therefore there's no Actions::Katello::Host::Erratum::Install to report on. Could that be the case? Did they see any applicable errata for the host prior applying?
Upstream bug assigned to wpinheir
Moving this bug to POST for triage into Satellite since the upstream issue https://projects.theforeman.org/issues/32312 has been resolved.
Resetting the state since additional fix has been sent for the review.
Verified on 6.10.0 snap 2.0. Steps: 1. Sync Red Hat Enterprise Linux 7 Server RPMs x86_64 7Server repo. 2. Register a RHEL 7.9 content host and apply applicable errata: Hosts > Content Hosts > click on content host > Errata tab > select errata > Apply Selected > Apply. 3. Generate a report from the Applied Errata report template: Monitor > Report Templates > click Generate for 'Host - Applied Errata'. Fill fields: Filter Errata Type: all Include Last Reboot: no Status: success and click Submit. 4. Open the generated CSV file, and verify that the applied errata are listed.
*** Bug 1939538 has been marked as a duplicate of this bug. ***
*** Bug 1965379 has been marked as a duplicate of this bug. ***
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 (Moderate: Satellite 6.10 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-2021:4702