Bug 883850 - Hosts from another data center displayed when clicked on "Hosts" in tree view for cluster names with a single difference.
Hosts from another data center displayed when clicked on "Hosts" in tree view...
Status: CLOSED WONTFIX
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine (Show other bugs)
unspecified
Unspecified Unspecified
unspecified Severity unspecified
: ---
: 3.1.4
Assigned To: Eli Mesika
Jiri Belka
infra
: ZStream
Depends On: 874660
Blocks:
  Show dependency treegraph
 
Reported: 2012-12-05 07:31 EST by Chris Pelland
Modified: 2016-02-10 14:07 EST (History)
12 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 874660
Environment:
Last Closed: 2013-04-09 04:52:31 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: Infra
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
tree screenshots (archive) (203.02 KB, application/x-tar)
2013-01-23 10:08 EST, Jiri Belka
no flags Details

  None (edit)
Description Chris Pelland 2012-12-05 07:31:47 EST
+++ This bug was initially created as a clone of Bug #874660 +++

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:

--- Additional comment from Gowrishankar Rajaiyan on 2012-11-08 10:37:42 EST ---

Created attachment 640887 [details]
Screenshot of hosts from different datacenter getting displayed

--- Additional comment from Gowrishankar Rajaiyan on 2012-11-08 10:39:33 EST ---

Created attachment 640889 [details]
Engine log

--- Additional comment from Simon Grinberg on 2012-11-08 10:53:24 EST ---

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 '_'

--- Additional comment from Itamar Heim on 2012-11-09 00:50:51 EST ---

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...

--- Additional comment from Gowrishankar Rajaiyan on 2012-11-09 01:07:42 EST ---

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.

--- Additional comment from Eli Mesika on 2012-11-11 21:39:04 EST ---

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

--- Additional comment from Eli Mesika on 2012-11-12 17:57:42 EST ---

http://gerrit.ovirt.org/#/c/9207/

--- Additional comment from Eli Mesika on 2012-11-13 04:23:48 EST ---

fixed in commit: d3de5c3
Comment 3 Jiri Belka 2013-01-23 10:08:39 EST
Created attachment 685985 [details]
tree screenshots (archive)

The tree is not OK. Please attached screenshots.
Comment 4 Barak 2013-04-09 04:52:31 EDT
On bug scrubbing for 3.1.4 qe pm and devel decided to CLOSE WONTFIX , this is not interesting enough and no customer ticket is involved.

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