Bug 1600456

Summary: All hosts page broke: comparison of String with nil failed
Product: Red Hat Satellite Reporter: Nikhil Kathole <nkathole>
Component: HostsAssignee: satellite6-bugs <satellite6-bugs>
Status: CLOSED DUPLICATE QA Contact: Nikhil Kathole <nkathole>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.4CC: inecas, tbrisker
Target Milestone: UnspecifiedKeywords: Regression
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: 2018-07-12 11:26:15 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
screenshot of UI none

Description Nikhil Kathole 2018-07-12 10:05:20 UTC
Created attachment 1458334 [details]
screenshot of UI

Description of problem:

While verifying https://bugzilla.redhat.com/show_bug.cgi?id=1477550, I run remote execution job on multiple host (more than 20 hosts using select all bulk action).

But after that found Hosts -> All hosts page is broken.

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

Satellite 6.4 snap 11


How reproducible: always


Steps to Reproduce:
1. Create 25 content hosts in satellite (assuming per page entries 20)
2. Select all hosts
3. Click "Select all X hosts"
4. Select action > schedule remote job
5. Run remote execution job on all hosts
6. Navigate to Hosts -> all hosts page

Actual results:

Remote execution job will run on all hosts but after that all hosts page found broken showing error

Oops, we're sorry but something went wrong comparison of String with nil failed

and production.log showed

2018-07-12T06:00:32 [I|app|] Started GET "/hosts" for IP at 2018-07-12 06:00:32 -0400
2018-07-12T06:00:32 [I|app|175aa] Processing by HostsController#index as HTML
2018-07-12T06:00:32 [I|app|175aa] Current user: admin (administrator)
2018-07-12T06:00:32 [I|app|175aa]   Rendering hosts/index.html.erb within layouts/application
2018-07-12T06:00:32 [I|app|175aa]   Rendered hosts/_list.html.erb (39.0ms)
2018-07-12T06:00:32 [I|app|175aa]   Rendered hosts/index.html.erb within layouts/application (53.0ms)
2018-07-12T06:00:32 [W|app|175aa] Action failed
ActionView::Template::Error: comparison of String with nil failed
/usr/share/foreman/app/helpers/hosts_helper.rb:104:in `sort_by'
/usr/share/foreman/app/helpers/hosts_helper.rb:104:in `name_column'
/opt/theforeman/tfm/root/usr/share/gems/gems/foreman_openscap-0.9.3/app/helpers/concerns/foreman_openscap/hosts_helper_extensions.rb:10:in `name_column'
/usr/share/foreman/app/views/hosts/_list.html.erb:33:in `block in _1079a410898c9228e0671c41cb785529'
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activerecord-5.1.6/lib/active_record/relation/delegation.rb:39:in `each'
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activerecord-5.1.6/lib/active_record/relation/delegation.rb:39:in `each'
/usr/share/foreman/app/views/hosts/_list.html.erb:21:in `_1079a410898c9228e0671c41cb785529'
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/actionview-5.1.6/lib/action_view/template.rb:157:in `block in render'
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activesupport-5.1.6/lib/active_support/notifications.rb:168:in `instrument'
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/actionview-5.1.6/lib/action_view/template.rb:352:in `instrument_render_template'


Expected results: 

All hosts page should not break.


Additional info:
Satellite was having some provisioned host and some content hosts.

Comment 5 Tomer Brisker 2018-07-12 11:26:15 UTC

*** This bug has been marked as a duplicate of bug 1599989 ***