Bug 864362

Summary: name_autocomplete raising exception while adding system to system group
Product: Red Hat Satellite Reporter: Sachin Ghai <sghai>
Component: WebUIAssignee: Tom McKay <tomckay>
Status: CLOSED UPSTREAM QA Contact: Sachin Ghai <sghai>
Severity: high Docs Contact:
Priority: unspecified    
Version: 6.0.0CC: jweiss, mmccune, tomckay
Target Milestone: UnspecifiedKeywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-09-19 18:15:29 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
exception raised when you add system to sys group. if sysname is 'test' then add it like 'test ('
none
notice name autocomplete shows the system name with date/time of registration
none
add sys to sys group with given patterns none

Description Sachin Ghai 2012-10-09 08:51:49 UTC
Created attachment 623999 [details]
exception raised when you add system to sys group. if sysname is 'test' then add it like  'test ('

Description of problem:
When you add a system to system group, UI auto complete the system name with "date of registration"

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

katello-glue-candlepin-1.1.13-1.git.94.c7b071c.el6_3.noarch
katello-configure-1.1.10-1.git.48.b44a09b.el6_3.noarch
katello-qpid-broker-key-pair-1.0-1.noarch
katello-all-1.1.13-1.git.94.c7b071c.el6_3.noarch
katello-cli-1.1.9-1.git.87.d650484.el6_3.noarch
katello-cli-common-1.1.9-1.git.87.d650484.el6_3.noarch
katello-certs-tools-1.1.8-1.el6.noarch
katello-common-1.1.13-1.git.94.c7b071c.el6_3.noarch
katello-selinux-1.1.2-1.el6.noarch
katello-candlepin-cert-key-pair-1.0-1.noarch
katello-glue-pulp-1.1.13-1.git.94.c7b071c.el6_3.noarch
katello-1.1.13-1.git.94.c7b071c.el6_3.noarch
katello-glue-foreman-1.1.13-1.git.94.c7b071c.el6_3.noarch
katello-qpid-client-key-pair-1.0-1.noarch


How reproducible:
always

Steps to Reproduce:
1. register a system 'test'
2. create a system group
3. when you add system 'test' to system group, notice the 'autocomplete' name with the date/time of registration
4. try add the sys name like 'test ('
  
Actual results:
exception raised on UI

Expected results:
no exception should be raised on UI. 

Additional info:

Comment 1 Sachin Ghai 2012-10-09 08:54:23 UTC
Created attachment 624000 [details]
notice name autocomplete shows the system name with date/time of registration

Comment 2 Sachin Ghai 2012-10-09 08:56:30 UTC
snippet from production.log:

--
[ERROR: 2012-10-09 11:21:04 #29308] Rendering 500:500 : {&quot;error&quot;:&quot;SearchPhaseExecutionException[Failed to execute phase [query], total failure; shardFailures {[K1N6C5GcRhmbR_le1WIDdg][katello_system][0]: SearchParseException[[katello_system][0]: from[-1],size[-1]: Parse Failure [Failed to parse source [{\&quot;filter\&quot;:{\&quot;terms\&quot;:{\&quot;environment_id\&quot;:[2,1]}},\&quot;query\&quot;:{\&quot;query_string\&quot;:{\&quot;query\&quot;:\&quot;name_autocomplete:mysys (\&quot;}}}]]]; nested: QueryParsingException[[katello_system] Failed to parse query [name_autocomplete:mysys (]]; nested: ParseException[Cannot parse 'name_autocomplete:mysys (': Encountered \&quot;&lt;EOF&gt;\&quot; at line 1, column 25.\nWas expecting one of:\n    &lt;NOT&gt; ...\n    \&quot;+\&quot; ...\n    \&quot;-\&quot; ...\n    \&quot;(\&quot; ...\n    \&quot;*\&quot; ...\n    &lt;QUOTED&gt; ...\n    &lt;TERM&gt; ...\n    &lt;PREFIXTERM&gt; ...\n    &lt;WILDTERM&gt; ...\n    \&quot;[\&quot; ...\n    \&quot;{\&quot; ...\n    &lt;NUMBER&gt; ...\n    &lt;TERM&gt; ...\n    \&quot;*\&quot; ...\n    ]; nested:
--

Comment 4 Sachin Ghai 2012-10-09 10:03:40 UTC
Similar issue found in latest CFSE puddle:

katello-1.1.12-14.el6cf.noarch

when you add system to system group with any of following sequences in 'Add text widget' then a exception raised on UI:

systemname (
systemname )
systemname ()
systemname !

Please see the attachment for exact location on UI.

Comment 5 Sachin Ghai 2012-10-09 10:05:08 UTC
Created attachment 624015 [details]
add sys to sys group with given patterns

Comment 6 Mike McCune 2012-10-09 21:11:48 UTC
ugly, but not a blocker

Comment 7 Tom McKay 2012-10-10 12:38:59 UTC
Already have pull-request to fix. If it's ASSIGNED state, that means I'm active on it.

Comment 8 Tom McKay 2012-10-10 14:58:19 UTC
  Branch: refs/heads/master
  Home:   https://github.com/Katello/katello
  Commit: 4e8626001d4df16ca9641392b9793fe4a0e96560
      https://github.com/Katello/katello/commit/4e8626001d4df16ca9641392b9793fe4a0e96560
  Author: Tom McKay <thomasmckay>
  Date:   2012-10-09 (Tue, 09 Oct 2012)

Comment 9 Marek Hulan 2012-12-18 14:36:44 UTC
*** Bug 839286 has been marked as a duplicate of this bug. ***

Comment 10 Mike McCune 2013-09-19 18:15:29 UTC
These bugs have been resolved in upstream projects for a period of months so I'm mass-closing them as CLOSED:UPSTREAM.  If this is a mistake feel free to re-open.