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 1936462 - 'Applied Errata' report fails with error 'no implicit conversion of nil into Array'
Summary: 'Applied Errata' report fails with error 'no implicit conversion of nil into ...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Reporting
Version: 6.9.0
Hardware: All
OS: All
unspecified
high
Target Milestone: 6.10.0
Assignee: satellite6-bugs
QA Contact: Lukáš Hellebrandt
URL:
Whiteboard:
Depends On: 1737536 1920819
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-03-08 14:26 UTC by Lukáš Hellebrandt
Modified: 2021-11-16 14:10 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1920819
Environment:
Last Closed: 2021-11-16 14:10:21 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 31748 0 High Closed 'Applied Errata' report fails with error 'no implicit conversion of nil into Array' 2021-03-09 14:25:21 UTC
Red Hat Product Errata RHSA-2021:4702 0 None None None 2021-11-16 14:10:35 UTC

Description Lukáš Hellebrandt 2021-03-08 14:26:00 UTC
6.10 clone of the 6.9 bug since the fix that caused this bug was postponed to 6.10

+++ This bug was initially created as a clone of Bug #1920819 +++

Description of problem: Applied Errata report fails, here is error trace

2021-01-27T00:21:47 [I|app|1c24b06d] Started POST "/templates/report_templates/153-Host%20-%20Applied%20Errata/schedule_report" for 127.0.0.1 at 2021-01-27 00:21:47 -0500
2021-01-27T00:21:47 [I|app|1c24b06d] Processing by ReportTemplatesController#schedule_report as HTML
2021-01-27T00:21:47 [I|app|1c24b06d]   Parameters: {"utf8"=>"✓", "authenticity_token"=>"1epfYMPtPmfsPXrp8fqO8DcVXZsRgDWOQnKZh9QzDlfrlGg/4TkHBSstujDjRe12ITB4s59mpVU3Byo7bQm+JQ==", "report_template_report"=>"[FILTERED]", "commit"=>"Submit", "id"=>"153-Host - Applied Errata"}
2021-01-27T00:21:48 [I|app|1c24b06d] Enqueued TemplateRenderJob (Job ID: 5c8cf240-119e-448b-a23e-66a985ca719e) to Dynflow(default) with arguments: {"template_id"=>"153-Host - Applied Errata", "gzip"=>false, "send_mail"=>false, "mail_to"=>"root", "format"=>"csv", "input_values"=>{"55"=>{"value"=>"all"}, "56"=>{"value"=>"no"}, "57"=>{"value"=>"success"}, "58"=>{"value"=>"2020-09-08 10:51:00"}, "59"=>{"value"=>"2021-01-27 10:51:00"}}}, {:user_id=>4}
2021-01-27T00:21:48 [I|app|1c24b06d] Redirected to https://vm255-31.gsslab.pnq2.redhat.com/templates/report_templates/153-Host%20-%20Applied%20Errata/report_data?job_id=5c8cf240-119e-448b-a23e-66a985ca719e
2021-01-27T00:21:48 [I|app|1c24b06d] Completed 302 Found in 142ms (ActiveRecord: 19.5ms | Allocations: 24864)
2021-01-27T00:21:48 [I|app|b3258986] Started GET "/templates/report_templates/153-Host%20-%20Applied%20Errata/report_data?job_id=5c8cf240-119e-448b-a23e-66a985ca719e" for 127.0.0.1 at 2021-01-27 00:21:48 -0500
2021-01-27T00:21:48 [I|app|b3258986] Processing by ReportTemplatesController#report_data as HTML
2021-01-27T00:21:48 [I|app|b3258986]   Parameters: {"job_id"=>"5c8cf240-119e-448b-a23e-66a985ca719e", "id"=>"153-Host - Applied Errata"}
2021-01-27T00:21:48 [I|app|1c24b06d] Performing TemplateRenderJob (Job ID: 5c8cf240-119e-448b-a23e-66a985ca719e) from Dynflow(default) enqueued at 2021-01-27T05:21:47Z with arguments: {"template_id"=>"153-Host - Applied Errata", "gzip"=>false, "send_mail"=>false, "mail_to"=>"root", "format"=>"csv", "input_values"=>{"55"=>{"value"=>"all"}, "56"=>{"value"=>"no"}, "57"=>{"value"=>"success"}, "58"=>{"value"=>"2020-09-08 10:51:00"}, "59"=>{"value"=>"2021-01-27 10:51:00"}}}, {:user_id=>4}
2021-01-27T00:21:48 [I|app|b3258986]   Rendering report_templates/report_data.html.erb within layouts/application
2021-01-27T00:21:48 [I|app|b3258986]   Rendered report_templates/report_data.html.erb within layouts/application (Duration: 10.8ms | Allocations: 6824)
2021-01-27T00:21:48 [I|app|b3258986]   Rendered layouts/_application_content.html.erb (Duration: 7.2ms | Allocations: 6992)
2021-01-27T00:21:48 [I|app|b3258986]   Rendering layouts/base.html.erb
2021-01-27T00:21:48 [I|app|b3258986]   Rendered /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_theme_satellite-7.0.1.4/app/views/foreman_theme_satellite/_theme_client_side_branding.js.erb (Duration: 7.2ms | Allocations: 6852)
2021-01-27T00:21:48 [I|app|b3258986]   Rendered layouts/base.html.erb (Duration: 80.2ms | Allocations: 39163)
2021-01-27T00:21:48 [I|app|b3258986] Completed 200 OK in 136ms (Views: 105.3ms | ActiveRecord: 6.3ms | Allocations: 64679)
2021-01-27T00:21:48 [E|app|1c24b06d] Error performing TemplateRenderJob (Job ID: 5c8cf240-119e-448b-a23e-66a985ca719e) from Dynflow(default) in 424.03ms: TypeError (no implicit conversion of nil into Array):
 1c24b06d | /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.18.1.3/app/lib/katello/concerns/base_template_scope_extensions.rb:127:in `&'
 1c24b06d | /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.18.1.3/app/lib/katello/concerns/base_template_scope_extensions.rb:127:in `block in load_errata_applications'
 1c24b06d | /opt/theforeman/tfm/root/usr/share/gems/gems/activerecord-6.0.3.4/lib/active_record/relation/batches/batch_enumerator.rb:64:in `block in each'
 1c24b06d | /opt/theforeman/tfm/root/usr/share/gems/gems/activerecord-6.0.3.4/lib/active_record/relation/batches.rb:238:in `block in in_batches'
 1c24b06d | /opt/theforeman/tfm/root/usr/share/gems/gems/activerecord-6.0.3.4/lib/active_record/relation/batches.rb:222:in `loop'
 1c24b06d | /opt/theforeman/tfm/root/usr/share/gems/gems/activerecord-6.0.3.4/lib/active_record/relation/batches.rb:222:in `in_batches'


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


How reproducible: Always


Additional info:
[root@vm255-31 ~]# rpm -qa | grep satellite
satellite-6.9.0-0.3.beta.el7sat.noarch

--- Additional comment from Ranjan Kumar on 2021-01-27 05:37:52 UTC ---

To reproduce the issue, Restore the database dump attached in the support case 02848402 and upgrade to satellite 6.9

--- Additional comment from Marek Hulan on 2021-02-02 10:08:43 UTC ---

This is a regression caused by https://projects.theforeman.org/issues/30626, in case no host_filter is specified (nil), the `array & nil` fails. The fix should be simple. Ondrej, could you please take a look?

--- Additional comment from Ondřej Ezr on 2021-02-04 02:12:53 UTC ---

I'll keep an eye on the upstream PR, it goes the right direction, we will be able to finish it.

--- Additional comment from Ondřej Ezr on 2021-02-11 10:43:14 UTC ---

The upstream PR is ready to be merged.

--- Additional comment from Marek Hulan on 2021-02-19 11:28:44 UTC ---

There are some pending comments in the PR as of today.

--- Additional comment from Bryan Kearney on 2021-02-23 16:06:31 UTC ---

Moving this bug to POST for triage into Satellite since the upstream issue https://projects.theforeman.org/issues/31748 has been resolved.

--- Additional comment from Sat6QE Jenkins on 2021-02-24 20:05:20 UTC ---

build status: succeeded

brew:
 * tfm-rubygem-katello: closed - https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=35144245

Comment 2 Brad Buckingham 2021-03-08 15:25:57 UTC
Hi Lukas,

It is unclear from the original bugzilla (bug 1920819) and PR what work is to be done in a future release.

Is there an updated description or set up steps to outline the issue that remains?

Thanks!

Comment 3 Lukáš Hellebrandt 2021-03-09 14:19:33 UTC
If I understood the issue correctly: Fixing bug 1737536 caused bug 1920819 (from which this BZ was cloned). Bug 1920819 got fixed. However, neither of those fixes made it to the recent snap of 6.9. In 6.10, it's necessary to include both fixes and verify these two BZs.

Comment 4 Ondřej Ezr 2021-03-09 14:25:23 UTC
Yes, exacly. Both fixes should be in 6.10 automatically, moving to POST on 6.10.

Comment 5 Brad Buckingham 2021-03-09 14:25:52 UTC
Thanks Lukas!  So the intent is to make sure that we re-verify the behavior from bug 1920819 with this clone (bug 1936462) in Satellite 6.10, when the RFE bug 1737536 is included.

Comment 6 Bryan Kearney 2021-03-09 16:05:44 UTC
Moving this bug to POST for triage into Satellite since the upstream issue https://projects.theforeman.org/issues/31748 has been resolved.

Comment 7 Lukáš Hellebrandt 2021-06-17 10:37:40 UTC
Pre-verified with Sat 6.10.0 snap 4.0.

On a clean Satellite with some host with applied errata, the report can be generated both with empty hosts filter and with a hosts filter that doesn't match any host (one of these probably caused the error as nil can't be converted to array).

However, bug 1737536 has failedQA so I'm waiting for that one to be verified before finally verifying this one.

Comment 10 Lukáš Hellebrandt 2021-10-18 14:02:42 UTC
Verified with Sat 6.10.0 snap 23.0.

The report can now be generated successfully.

Comment 13 errata-xmlrpc 2021-11-16 14:10:21 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 (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


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