Bug 1909657

Summary: undefined method `title' for nil:NilClass when viewing a host without a location
Product: Red Hat Satellite Reporter: Evgeni Golov <egolov>
Component: HostsAssignee: Tomer Brisker <tbrisker>
Status: CLOSED CURRENTRELEASE QA Contact: tstrych
Severity: medium Docs Contact:
Priority: medium    
Version: 6.7.0CC: ahumbe, inecas
Target Milestone: UnspecifiedKeywords: Regression, Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-04-01 09:29:42 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:

Description Evgeni Golov 2020-12-21 10:13:48 UTC
Description of problem:
When viewing a host entry that has no location assigned, 6.7 will render a "undefined method `title' for nil:NilClass" error on the left hand side where the host details are listed.

This was not an issue in 6.6

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

How reproducible:
100%

Steps to Reproduce:
1. visit https://dogfood.sat.engineering.redhat.com/hosts/sat-r220-02.lab.eng.rdu2.redhat.com

Actual results:
undefined method `title' for nil:NilClass

Expected results:
host details are shown

Additional info:
from production log:
2020-12-21T05:11:32 [I|app|49156a3c] Started GET "/hosts/sat-r220-02.lab.eng.rdu2.redhat.com/overview" for 10.36.114.136 at 2020-12-21 05:11:32 -0500
2020-12-21T05:11:32 [I|app|49156a3c] Processing by HostsController#overview as HTML
2020-12-21T05:11:32 [I|app|49156a3c]   Parameters: {"id"=>"sat-r220-02.lab.eng.rdu2.redhat.com"}
2020-12-21T05:11:32 [I|app|49156a3c]   Rendered hosts/_overview.html.erb (181.3ms)
2020-12-21T05:11:32 [W|app|49156a3c] Failed to fetch overview information
2020-12-21T05:11:32 [I|app|49156a3c]   Rendered common/_ajax_error.html.erb (0.7ms)
2020-12-21T05:11:32 [I|app|49156a3c] Completed 500 Internal Server Error in 208ms (Views: 1.3ms | ActiveRecord: 24.7ms)

Comment 1 Tomer Brisker 2021-04-01 09:23:52 UTC
Connecting redmine issue https://projects.theforeman.org/issues/28891 from this bug

Comment 2 Tomer Brisker 2021-04-01 09:29:42 UTC
This has been fixed already in 6.8, closing as CURRENTRELEASE