Bug 1202307 - Defining discovery rule with "organization = under search raises 500 ISE in production.log
Summary: Defining discovery rule with "organization = under search raises 500 ISE in ...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: WebUI
Version: 6.1.0
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: Unspecified
Assignee: Stephen Benjamin
QA Contact: Sachin Ghai
URL: http://projects.theforeman.org/issues...
Whiteboard:
Depends On:
Blocks: 1193977
TreeView+ depends on / blocked
 
Reported: 2015-03-16 11:23 UTC by Sachin Ghai
Modified: 2017-02-23 20:18 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-08-12 16:04:51 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
search query with "organization = raises 500 ISE (63.26 KB, image/png)
2015-03-16 11:23 UTC, Sachin Ghai
no flags Details
reproducible with latest compose (84.50 KB, image/png)
2015-04-28 11:34 UTC, Sachin Ghai
no flags Details
seraching hosts by organization raises same error on hosts page (66.76 KB, image/png)
2015-05-05 10:14 UTC, Sachin Ghai
no flags Details
search auto completes the org name without any error (90.57 KB, image/png)
2015-07-20 07:52 UTC, Sachin Ghai
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 10735 0 None None None 2016-04-22 16:42:18 UTC

Description Sachin Ghai 2015-03-16 11:23:25 UTC
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:

Comment 2 Lukas Zapletal 2015-03-17 14:21:17 UTC
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.

Comment 3 Sachin Ghai 2015-03-19 05:04:04 UTC
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.

Comment 4 Lukas Zapletal 2015-03-19 09:46:49 UTC
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.

Comment 7 Sachin Ghai 2015-04-28 11:33:51 UTC
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.

Comment 8 Sachin Ghai 2015-04-28 11:34:57 UTC
Created attachment 1019635 [details]
reproducible with latest compose

Comment 9 orabin 2015-04-28 12:30:39 UTC
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.

Comment 12 Sachin Ghai 2015-05-04 13:39:14 UTC
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)

Comment 14 Sachin Ghai 2015-05-05 10:12:45 UTC
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.

Comment 15 Sachin Ghai 2015-05-05 10:14:04 UTC
Created attachment 1022149 [details]
seraching hosts by organization raises same error on hosts page

Comment 17 Stephen Benjamin 2015-06-08 17:51:52 UTC
Created redmine issue http://projects.theforeman.org/issues/10735 from this bug

Comment 18 Stephen Benjamin 2015-07-07 20:28:30 UTC
https://github.com/Katello/katello/pull/5283 merged

katello|d73f191e389c0165ee3e0005c934f1aa2fa79aed

Comment 22 Sachin Ghai 2015-07-20 07:49:53 UTC
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.

Comment 23 Sachin Ghai 2015-07-20 07:52:18 UTC
Created attachment 1053763 [details]
search auto completes the org name without any error

Comment 24 Bryan Kearney 2015-08-12 16:04:51 UTC
This bug was fixed in Satellite 6.1.1 which was delivered on 12 August, 2015.


Note You need to log in before you can comment on or make changes to this bug.