Created attachment 1002209 [details] search query with "organization = raises 500 ISE Description of problem: I was trying to define a discovery rule based on org_name, so I choose organization = from auto search. As soon as I auto selected "organization = ", UI throws following error in firebug: -- "NetworkError: 500 Internal Server Error - https://dhcp201-163.englab.pnq.redhat.com/discovered_hosts/auto_complete_search?search=+organization++%3D+" -- production.log raises: -- 2015-03-16 11:18:43 [I] Processing by DiscoveredHostsController#auto_complete_search as JSON 2015-03-16 11:18:43 [I] Parameters: {"search"=>" organization = "} 2015-03-16 11:18:43 [W] Operation FAILED: missing attribute: default_info 2015-03-16 11:18:43 [I] Rendered common/500.html.erb (5.4ms) 2015-03-16 11:18:43 [I] Completed 500 Internal Server Error in 23ms (Views: 6.1ms | ActiveRecord: 1.8ms) 2015-03-16 11:18:53 [I] Processing by DiscoveredHostsController#auto_complete_search as JSON 2015-03-16 11:18:53 [I] Parameters: {"search"=>" organization = "} 2015-03-16 11:18:53 [W] Operation FAILED: missing attribute: default_info 2015-03-16 11:18:53 [I] Rendered common/500.html.erb (5.4ms) 2015-03-16 11:18:53 [I] Completed 500 Internal Server Error in 23ms (Views: 6.1ms | ActiveRecord: 1.9ms) -- Version-Release number of selected component (if applicable): sat6.1 beta snap6 compose2 (Satellite-6.1.0-RHEL-6-20150311.1). How reproducible: always Steps to Reproduce: 1. go to configure --> discovery_rule 2. add a new rule and search query for "organization = 3. Actual results: -- "NetworkError: 500 Internal Server Error - https://dhcp201-163.englab.pnq.redhat.com/discovered_hosts/auto_complete_search?search=+organization++%3D+" -- Expected results: no error Additional info:
We might have a dupe, we've already have a similar one: http://projects.theforeman.org/issues/9088 Hmm maybe not related. Anyway, valid bug. Lowering priority as this does not block the user from entering whatever is expected.
I think anything related to 500 ISE should be on higher priority. This error looks ugly in all aspects. We really need to get this fixed by beta only. Setting the blocker flag to get into beta.
I don't agree. When you see 500 in the UI that's totally blocker, but in this case we only see 500 only in the production.log. Satellite 6 operates well. For this reason I gave it lower prio.
Reported issue is still reproducible with: sat6.1 GA snap1 compose 2 (Satellite-6.1.0-RHEL-7-20150424.0) -- 2015-04-28 07:29:59 [I] Parameters: {"search"=>"organization ="} 2015-04-28 07:29:59 [W] Operation FAILED: missing attribute: default_info 2015-04-28 07:29:59 [I] Rendered common/500.html.erb (128.5ms) 2015-04-28 07:29:59 [I] Completed 500 Internal Server Error in 162ms (Views: 150.1ms | ActiveRecord: 2.0ms) --- Please see the attached screenshot.
Created attachment 1019635 [details] reproducible with latest compose
The compose is using a version of discovery prior to Bryan's merge. The package needs to be rebuilt with the changes and then tested. Moving to post until there is a new package.
Reproducible with GA snap2 (Satellite-6.1.0-RHEL-7-20150429.2) production.log: ============ 2015-05-04 19:11:29 [I] Processing by DiscoveredHostsController#auto_complete_search as JSON 2015-05-04 19:11:29 [I] Parameters: {"search"=>" organization ="} 2015-05-04 19:11:30 [W] Operation FAILED: missing attribute: default_info 2015-05-04 19:11:30 [I] Rendered common/500.html.erb (6.2ms) 2015-05-04 19:11:30 [I] Completed 500 Internal Server Error in 204ms (Views: 8.9ms | ActiveRecord: 2.6ms)
Looks like this issue is not just with discovery. I can reproduce this issue with 'Hosts' page. when you search the hosts by organization = ", same issue appears there. -- 2015-05-05 15:44:46 [I] Processing by HostsController#auto_complete_search as JSON 2015-05-05 15:44:46 [I] Parameters: {"search"=>" organization = "} 2015-05-05 15:44:46 [W] Operation FAILED: missing attribute: default_info 2015-05-05 15:44:46 [I] Rendered common/500.html.erb (5.6ms) 2015-05-05 15:44:46 [I] Completed 500 Internal Server Error in 27ms (Views: 6.4ms | ActiveRecord: 2.4ms) -- please see the screenshot for more info.
Created attachment 1022149 [details] seraching hosts by organization raises same error on hosts page
Created redmine issue http://projects.theforeman.org/issues/10735 from this bug
https://github.com/Katello/katello/pull/5283 merged katello|d73f191e389c0165ee3e0005c934f1aa2fa79aed
Verified with sat6.1.1 GA snap13. Reported issue has been fixed. I didn;t see 500 ISE in production.log. Moreover, UI correctly auto completes the org_name while defining discovery rule. 2015-07-20 03:46:44 [I] Parameters: {"search"=>" organization = "} 2015-07-20 03:46:44 [I] Completed 200 OK in 11ms (Views: 0.2ms | ActiveRecord: 1.9ms) 2015-07-20 03:46:45 [I] Connecting to database specified by database.yml 2015-07-20 03:46:48 [I] Processing by DiscoveredHostsController#auto_complete_search as JSON 2015-07-20 03:46:48 [I] Parameters: {"search"=>" organization "} 2015-07-20 03:46:48 [I] Completed 200 OK in 142ms (Views: 0.5ms | ActiveRecord: 2.0ms) 2015-07-20 03:46:49 [I] Processing by DiscoveredHostsController#auto_complete_search as JSON 2015-07-20 03:46:49 [I] Parameters: {"search"=>" organization = Default_Organization"} 2015-07-20 03:46:49 [I] Completed 200 OK in 10ms (Views: 0.2ms | ActiveRecord: 1.6ms) Please see the screenshot for verification.
Created attachment 1053763 [details] search auto completes the org name without any error
This bug was fixed in Satellite 6.1.1 which was delivered on 12 August, 2015.