Bug 1714645

Summary: NoMethodError: undefined method `[]' for nil:NilClass
Product: Red Hat Satellite Reporter: Lukáš Hellebrandt <lhellebr>
Component: ReportingAssignee: Ondřej Ezr <oezr>
Status: CLOSED ERRATA QA Contact: Lukáš Hellebrandt <lhellebr>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.6.0CC: inecas, mhulan, oezr, oprazak, pcreech
Target Milestone: 6.6.0Keywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: foreman-1.22.0.8-1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-10-22 19:48:27 UTC 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:
Attachments:
Description Flags
production.log none

Description Lukáš Hellebrandt 2019-05-28 14:03:12 UTC
Description of problem:
When generating a report, sometimes, after getting to Download page, the error "Internal Server Error: the server was unable to finish the request. This may be caused by unavailability of some required service, incorrect API call or a server-side bug. There may be more information in the server's logs." is shown and the report is not generated.
There is "NoMethodError: undefined method `[]' for nil:NilClass" with traceback in production.log (attached).

This only happened to me once and I don't know how to trigger it. The only nonstandard thing in that case was "Generate at" set to past but I couldn't reproduce again this way.

Version-Release number of selected component (if applicable):
Reproduced on Sat 6.6 snap 4.

How reproducible:
Only happened once (in ~ 100 attempts)

Steps to Reproduce:
1. Monitoring -> Report Templates
2. Generate any template
3. Submit

Actual results:
Sometimes, it fails with an error and traceback

Expected results:
This should always work

Comment 3 Lukáš Hellebrandt 2019-05-28 14:06:23 UTC
Created attachment 1574345 [details]
production.log

Comment 5 Ondřej Ezr 2019-06-04 09:01:07 UTC
Created redmine issue https://projects.theforeman.org/issues/26942 from this bug

Comment 6 Bryan Kearney 2019-06-04 10:07:09 UTC
Upstream bug assigned to oezr

Comment 7 Bryan Kearney 2019-06-04 10:07:11 UTC
Upstream bug assigned to oezr

Comment 8 Bryan Kearney 2019-06-10 16:10:01 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue https://projects.theforeman.org/issues/26942 has been resolved.

Comment 10 Ondřej Ezr 2019-07-05 12:05:07 UTC
I have opened the PR, sorry for the delay :(

Comment 12 Lukáš Hellebrandt 2019-07-16 11:25:33 UTC
Verified sanity-only (since no reproducer) with Sat 6.6 snap 11, generating reports works.

Comment 13 Bryan Kearney 2019-10-22 19:48:27 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, 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-2019:3172