Bug 874660 - Hosts from another data center displayed when clicked on "Hosts" in tree view for cluster names with a single difference.
Summary: Hosts from another data center displayed when clicked on "Hosts" in tree view...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine
Version: unspecified
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: 3.2.0
Assignee: Eli Mesika
QA Contact: Jiri Belka
URL:
Whiteboard: infra
Depends On:
Blocks: 883850 915537
TreeView+ depends on / blocked
 
Reported: 2012-11-08 15:36 UTC by Gowrishankar Rajaiyan
Modified: 2016-02-10 19:40 UTC (History)
11 users (show)

Fixed In Version: sf6
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 883850 (view as bug list)
Environment:
Last Closed:
oVirt Team: Infra
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Screenshot of hosts from different datacenter getting displayed (153.57 KB, image/png)
2012-11-08 15:37 UTC, Gowrishankar Rajaiyan
no flags Details
Engine log (2.97 MB, text/plain)
2012-11-08 15:39 UTC, Gowrishankar Rajaiyan
no flags Details
Screenshot of VMs from tree view. (194.59 KB, image/png)
2012-11-09 06:07 UTC, Gowrishankar Rajaiyan
no flags Details
Pics showing that the reported scenario in the bug is OK now (232.92 KB, application/x-compressed-tar)
2013-01-26 21:23 UTC, Eli Mesika
no flags Details


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 11541 0 None None None Never

Description Gowrishankar Rajaiyan 2012-11-08 15:36:18 UTC
Description of problem:
I have 2 clusters in separate data centers named as "RHEL-H_Cluster" and "RHEL-H-Cluster" (observe the difference that one has a "-" and the other has a "_"), however, from the tree view when I click on the "Hosts" of "RHEL-H_Cluster" I see hosts from "RHEL-H-Cluster" as well.

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

How reproducible:


Steps to Reproduce:
1. Create a DataCenter1 and create a cluster named "RHEL-H_Cluster"
2. Add hosts to "RHEL-H_Cluster"
3. Create a DataCenter2 and create a cluster named "RHEL-H-Cluster"
4. Add hosts to "RHEL-H-Cluster"
5. In tree view, navigate to DataCenter1 | Clusters | RHEL-H_Cluster | Hosts.
6. Observe the hosts list on the right hand side.
  
Actual results:
Hosts from DataCenter2 are displayed as well.

Expected results:
Hosts from another datacenter should not be displayed.

Additional info:

Comment 1 Gowrishankar Rajaiyan 2012-11-08 15:37:42 UTC
Created attachment 640887 [details]
Screenshot of hosts from different datacenter getting displayed

Comment 2 Gowrishankar Rajaiyan 2012-11-08 15:39:33 UTC
Created attachment 640889 [details]
Engine log

Comment 3 Simon Grinberg 2012-11-08 15:53:24 UTC
Moving to backend since it's probably a search issue.

Need to check if this is a global issue where the search ignores these characters when matching search, or just does not distinguish '-' and '_'

Comment 4 Itamar Heim 2012-11-09 05:50:51 UTC
i'm pretty sure _ is a single character wildcard (like *).
sounds like we need either:
1. a parameter for search to not do a 'like', rather an equals ('=') in a search.
2. escape the _ when calling search from a tree.

i can only assume/hope we block '*' in entity names...

Comment 5 Gowrishankar Rajaiyan 2012-11-09 06:07:42 UTC
Created attachment 641269 [details]
Screenshot of VMs from tree view.

Additional info: See the same behaviour from the VMs node in tree view as well. VMs from another cluster in a different datacenter displayed.

Attaching screenshot.

Comment 6 Eli Mesika 2012-11-12 02:39:04 UTC
Actually the _ in Postgres is treated as ? in regular expressions when using the LIKE operator


engine=# create table test (a varchar(20));
CREATE TABLE
engine=# insert into test values ('123-456');
INSERT 0 1
engine=# insert into test values ('123_456');
INSERT 0 1
engine=# insert into test values ('123X456');
INSERT 0 1
engine=# select * from test ;
    a    
---------
 123-456
 123_456
 123X456
(3 rows)

engine=# select * from test where a ilike '123_456';
    a    
---------
 123-456
 123_456
 123X456


Solution should be , replacing all '_' with '\_' 

engine=# select * from test where a ilike '123\_456';
    a    
---------
 123_456

Comment 7 Eli Mesika 2012-11-12 22:57:42 UTC
http://gerrit.ovirt.org/#/c/9207/

Comment 8 Eli Mesika 2012-11-13 09:23:48 UTC
fixed in commit: d3de5c3

Comment 10 Jiri Belka 2013-01-25 11:20:21 UTC
Not fully OK, please check for my comments and screenshots in zstream clone - https://bugzilla.redhat.com/show_bug.cgi?id=883850#c3. Same issues in 3.2.x.

Comment 11 Eli Mesika 2013-01-26 21:23:45 UTC
Created attachment 688169 [details]
Pics showing that the reported scenario in the bug is OK now

Comment 13 Jiri Belka 2013-01-28 14:11:55 UTC
Created attachment 688997 [details]
tree

I can reproduce it even I tried to clean Firefox cache.

Comment 17 Eli Mesika 2013-02-04 09:38:56 UTC
fixed in commit : a28f219

Comment 19 Jiri Belka 2013-02-07 09:28:17 UTC
ok, sf6.

Comment 20 Itamar Heim 2013-06-11 08:47:42 UTC
3.2 has been released

Comment 21 Itamar Heim 2013-06-11 08:47:52 UTC
3.2 has been released

Comment 22 Itamar Heim 2013-06-11 08:47:52 UTC
3.2 has been released

Comment 23 Itamar Heim 2013-06-11 08:53:04 UTC
3.2 has been released

Comment 24 Itamar Heim 2013-06-11 09:23:47 UTC
3.2 has been released


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