Bug 1298330
Summary: | Template name with a space causes problems | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | Red Hat Enterprise Virtualization Manager | Reporter: | Jesus M. Rodriguez <jesusr> | ||||||||||
Component: | ovirt-engine | Assignee: | Shahar Havivi <shavivi> | ||||||||||
Status: | CLOSED NOTABUG | QA Contact: | |||||||||||
Severity: | medium | Docs Contact: | |||||||||||
Priority: | medium | ||||||||||||
Version: | 3.5.6 | CC: | jesusr, lsurette, masayag, michal.skrivanek, rbalakri, Rhev-m-bugs, tjelinek, yeylon, ykaul | ||||||||||
Target Milestone: | ovirt-3.6.5 | ||||||||||||
Target Release: | --- | ||||||||||||
Hardware: | Unspecified | ||||||||||||
OS: | Unspecified | ||||||||||||
Whiteboard: | |||||||||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||||||||
Doc Text: | Story Points: | --- | |||||||||||
Clone Of: | Environment: | ||||||||||||
Last Closed: | 2016-02-23 12:01:40 UTC | Type: | Bug | ||||||||||
Regression: | --- | Mount Type: | --- | ||||||||||
Documentation: | --- | CRM: | |||||||||||
Verified Versions: | Category: | --- | |||||||||||
oVirt Team: | Virt | RHEL 7.3 requirements from Atomic Host: | |||||||||||
Cloudforms Team: | --- | Target Upstream Version: | |||||||||||
Embargoed: | |||||||||||||
Attachments: |
|
Description
Jesus M. Rodriguez
2016-01-13 19:21:48 UTC
Created attachment 1114491 [details]
ovirt-engine export domain template screen
This screenshot shows the template was successfully imported.
Created attachment 1114492 [details]
ovirt engine template display
This screenshot shows the template in the list of templates.
Created attachment 1114495 [details]
screenshot showing RHEV engine version
Created attachment 1114496 [details]
ovirt engine logs
engine.log shows the following when using a name with a space:
2016-01-13 19:32:50,296 INFO [org.ovirt.engine.core.bll.SearchQuery] (ajp-/127.0.0.1:8702-8) ResourceManager::searchBusinessObjects - erroneous search text - Template : name=test space deployment-cfme-template
2016-01-13 19:32:50,324 INFO [org.ovirt.engine.core.bll.SearchQuery] (ajp-/127.0.0.1:8702-6) ResourceManager::searchBusinessObjects - erroneous search text - Template : name=test space deployment-cfme-template
2016-01-13 19:32:50,353 INFO [org.ovirt.engine.core.bll.SearchQuery] (ajp-/127.0.0.1:8702-7) ResourceManager::searchBusinessObjects - erroneous search text - Template : name=test space deployment-cfme-template
Also searching with the search bar in the UI causes the following invalid SQL to cause an exception: Position: 707: org.springframework.jdbc.BadSqlGrammarException: StatementCallback; bad SQL grammar [SELECT * FROM (SELECT * FROM vm_templates_view WHERE ( vmt_guid IN (SELECT distinct vm_templates_storage_domain.vmt_guid FROM vm_templates_storage_domain WHERE vm_templates_view.storage_pool_name ILIKE 'Default' AND ( vm_templates_storage_domain.name ILIKE '%deployment-cfme-template%' OR vm_templates_storage_domain.description ILIKE '%deployment-cfme-template%' OR vm_templates_storage_domain.quota_name ILIKE '%deployment-cfme-template%' OR vm_templates_storage_domain.storage_pool_name ILIKE '%deployment-cfme-template%' OR vm_templates_storage_domain.vds_group_name ILIKE '%deployment-cfme-template%' OR vm_templates_storage_domain.free_text_comment ILIKE '%deployment-cfme-template%' OR vm_templates_storage_domain.template_version_name, template_version_number ILIKE '%deployment-cfme-template%' ) )) ORDER BY name ASC ) as T1 OFFSET (1 -1) LIMIT 100]; nested exception is org.postgresql.util.PSQLException: ERROR: argument of OR must be type boolean, not type character varying Position: 707 The offending piece is: OR vm_templates_storage_domain.template_version_name, Seems it should have a value to result in a boolean, ILIKE or == etc. I'm not sure if this is related to the fact that I'm searching for a template with a space in it or not. Script as a github gist for posterity: https://gist.github.com/jmrodri/546b26f7fd9fb302355f How did you exported the template with space in the name for the first place? This should be prevented... @Jesus: ping Templates with space in name are not supported in oVirt. It is validated both when creating from frontend and REST. We could introduce support for this but it would not be simple to handle all cases where it could fail for not too big gain. So, closing as not a bug considering the template has been created externally with a name not compatible with the ovirt's standards. Please feel free to reopen if the above is not true. |