Description of problem: Entities (like DCs, VMs, templates, ...) with special character in the description or comment cannot be found according to it. Version-Release number of selected component (if applicable): ovirt-engine-3.4.0-0.5.beta1.el6.noarch How reproducible: 100% Steps to Reproduce: 1. Create a DC (or cluster, storage, VM,...) with special character(s) in the description. By special characters it's meant: !#^&<>;"' 2. Search the DC by description using one of the special characters in the search query, i.e., Datacenter: description = "#" -- or with wildcards -- Datacenter: description = "*#*" 3. Actual results: The search result is empty. In the engine.log you'll find a warn message, but no warning appears in the UI (Webadmin) - nothing in the bottom Events panel nor anywhere else. engine.log: 2014-02-06 17:45:01,825 WARN [org.ovirt.engine.core.bll.SearchQuery] (ajp--127.0.0.1-8702-11) ResourceManager::searchBusinessObjects - erroneous search text - Datacenter: description = "*#*" Expected results: Special characters should be treated as plain strings so DC from step 1 is returned. Additional info: Three more characters are problematic: 1. '\' character is ignored when searching (I guess the search backend filters it out from the search query) 2. there is no way how to search the '*' character, because it's used as the wildcard character 3. '%' character is interchangeable with '*' so you cannot search for it neither
There is also no way how to search for items which do not have certain field filled at all. For example I want to see all network which do not have a any label Search: Network: label = "" does not work nor does Network: label != "*"
(In reply to Martin Pavlik from comment #1) > There is also no way how to search for items which do not have certain field > filled at all. > > For example I want to see all network which do not have a any label > > Search: > Network: label = "" > does not work > > nor does > Network: label != "*" I agree, more accurate handling IMHO will be to support special values NULL and EMPTY_STRING to enable that and this worth a special RFE that will probably enable us to handle it before this RFE since it is less complex. So, if you have no objection, please open a different RFE on that
Done, opened bug 1067844
I had investigated it and its origin is in BaseConditionFieldAutoCompleter::isValid(String field, String value) This method is called from various value types detection and disallow any char of : {^,<,>,&,#,!,;} I think that this method is redundant, when we have a string value we should allow all I had checked returning true from BaseConditionFieldAutoCompleter::isValid(String field, String value) and it worked perfectly Yair, do we have any problem having those characters in AD search ?
(In reply to Eli Mesika from comment #4) > I had investigated it and its origin is in > BaseConditionFieldAutoCompleter::isValid(String field, String value) > This method is called from various value types detection and disallow any > char of : {^,<,>,&,#,!,;} > > I think that this method is redundant, when we have a string value we should > allow all > I had checked returning true from > BaseConditionFieldAutoCompleter::isValid(String field, String value) and it > worked perfectly > > Yair, do we have any problem having those characters in AD search ? & and ! are used in the ldap query language. You can see here a list of characters that need t boe escaped - http://docs.oracle.com/javase/jndi/tutorial/beyond/names/syntax.html < > # ; are among these characters.
Closing older BZs, if still happened, please reopen.