Bug 1860351
Summary: | 'Host - compare content hosts packages' report fails with error 'undefined method '#first' for NilClass' | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | Red Hat Satellite | Reporter: | Ranjan Kumar <rankumar> | ||||||
Component: | Reporting | Assignee: | Shira Maximov <mshira> | ||||||
Status: | CLOSED ERRATA | QA Contact: | Lukáš Hellebrandt <lhellebr> | ||||||
Severity: | medium | Docs Contact: | |||||||
Priority: | high | ||||||||
Version: | 6.8.0 | CC: | jyejare, mhulan, mshira, oprazak, tbrisker | ||||||
Target Milestone: | 6.8.0 | Keywords: | Triaged | ||||||
Target Release: | Unused | ||||||||
Hardware: | All | ||||||||
OS: | All | ||||||||
Whiteboard: | |||||||||
Fixed In Version: | foreman-2.1.2.3-1 | Doc Type: | If docs needed, set a value | ||||||
Doc Text: | Story Points: | --- | |||||||
Clone Of: | Environment: | ||||||||
Last Closed: | 2020-10-27 13:04:32 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: |
|
Created attachment 1702333 [details]
Screen 2
Hi Ranjan, Thanks for the bugzilla report. Is this a duplicate of bug 1860430? Would it be possible to provide the exact reproducer steps in each bugzilla so that we can see what is different? Thanks! @Brad Yes, Its different from BZ#1860430 Easy to reproduce, Just use a hostname that do not exist in satellite. For eg host_not_exit.local doesn't exist in satellite. This will raise an error. But it should return a valid error message like "404 Host host_not_exit.local not found" hammer report-template generate --inputs "Host 1 = host1.example.local,Host 2 = host_not_exit.local" --name 'Host - compare content hosts packages' Unrecognized status code :internal_error Created redmine issue https://projects.theforeman.org/issues/30556 from this bug Upstream bug assigned to mshira Upstream bug assigned to mshira Moving this bug to POST for triage into Satellite since the upstream issue https://projects.theforeman.org/issues/30556 has been resolved. This is *almost* fixed right, except when I enter the same (valid) hosts in both host fields, I get a misleading error of "At least one of the hosts couldn't be found." Shira, do you prefer me to fail this BZ or validate it and file a new one about this minor issue? Lukas, I would prefer that you validate this BZ and file a new one, thanks! Verified as per comment 12 and comment 13. Hosts can now be specified and the results are correct. 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.8 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-2020:4366 |
Created attachment 1702332 [details] Screen 1 Description of problem: Generating 'Host - compare content hosts packages' using wrong host fails with error "undefined method '#first' for NilClass::Jail (NilClass)" in WebUI Hammer also fails with different error #hammer report-template generate --inputs "Host 1 = host1.example.local,Host 2 = wrong.host.local" --name 'Host - compare content hosts packages' Unrecognized status code :internal_error Production log: 2020-07-24T16:25:53 [I|app|16e87c8c] Started POST "/api/report_templates/243/generate" for 127.0.0.1 at 2020-07-24 16:25:53 +0530 2020-07-24T16:25:53 [I|app|16e87c8c] Processing by Api::V2::ReportTemplatesController#generate as JSON 2020-07-24T16:25:53 [I|app|16e87c8c] Parameters: {"input_values"=>"[FILTERED]", "apiv"=>"v2", "id"=>"243", "report_template"=>{}} 2020-07-24T16:25:53 [I|app|16e87c8c] Authorized user admin(Admin User) 2020-07-24T16:25:53 [W|app|16e87c8c] Scoped order is ignored, it's forced to be batch order. 2020-07-24T16:25:53 [W|app|16e87c8c] Scoped order is ignored, it's forced to be batch order. 2020-07-24T16:25:54 [W|app|16e87c8c] Action failed 2020-07-24T16:25:54 [I|app|16e87c8c] Rendering api/v2/errors/standard_error.json.rabl within api/v2/layouts/error_layout 2020-07-24T16:25:54 [I|app|16e87c8c] Rendered api/v2/errors/standard_error.json.rabl within api/v2/layouts/error_layout (Duration: 14.6ms | Allocations: 6560) 2020-07-24T16:25:54 [I|app|16e87c8c] Completed 500 Internal Server Error in 434ms (Views: 21.5ms | ActiveRecord: 69.9ms | Allocations: 198510) Version-Release number of selected component (if applicable): Satellite 6.8 How reproducible: Always Actual results: raise and error Expected results: Should fail with valid error message Additional info: [root@dhcp130-171 foreman]# rpm -qa satellite satellite-6.8.0-0.7.beta.el7sat.noarch [root@dhcp130-171 foreman]# rpm -qa foreman foreman-2.1.0.1-1.el7sat.noarch [root@dhcp130-171 foreman]# rpm -qa katello katello-3.16.0-0.4.rc4.el7sat.noarch