Bug 1056965 - OSInfo file lacks validation for legal values
Summary: OSInfo file lacks validation for legal values
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: oVirt
Classification: Retired
Component: ovirt-engine-core
Version: 3.4
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: 3.5.1
Assignee: Roy Golan
QA Contact: bugs@ovirt.org
URL:
Whiteboard: virt
Depends On:
Blocks: 1093002
TreeView+ depends on / blocked
 
Reported: 2014-01-23 09:19 UTC by Eli Mesika
Modified: 2016-02-10 19:50 UTC (History)
7 users (show)

Fixed In Version: ovirt-3.5.1_rc1
Clone Of:
Environment:
Last Closed: 2015-01-21 16:02:35 UTC
oVirt Team: Virt
Embargoed:


Attachments (Terms of Use)
Engine log (461.69 KB, text/x-log)
2014-01-23 09:19 UTC, Eli Mesika
no flags Details


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 30782 0 master MERGED core: validate osinfo properties files - fail backend on error Never
oVirt gerrit 33323 0 master MERGED packaging: fail the build if osinfo-defaults.properties fails to parse Never
oVirt gerrit 34819 0 ovirt-engine-3.5 MERGED core: validate osinfo properties files - fail backend on error Never
oVirt gerrit 34820 0 ovirt-engine-3.5 MERGED packaging: fail the build if osinfo-defaults.properties fails to parse Never
oVirt gerrit 34959 0 ovirt-engine-3.5 MERGED packaging:[ver2] fail the build if osinfo-defaults.properties fails to parse Never

Description Eli Mesika 2014-01-23 09:19:26 UTC
Created attachment 854262 [details]
Engine log

Description of problem:
OSInfo file luck validation for legal values

For example changing the following 
os.windows_8.devices.display.protocols.value = vnc/cirrus
to
os.windows_8.devices.display.protocols.value = aaa/bbb

Throws the following exception

2014-01-23 10:52:13,079 ERROR [org.ovirt.engine.core.bll.OsRepositoryQuery] (ajp--127.0.0.1-8702-2) Query OsRepositoryQuery failed. Exception message is No enum constant org.ovirt.engine.core.common.businessentities.DisplayType.aaa : java.lang.IllegalArgumentException: No enum constant org.ovirt.engine.core.common.businessentities.DisplayType.aaa: java.lang.IllegalArgumentException: No enum constant org.ovirt.engine.core.common.businessentities.DisplayType.aaa


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


How reproducible:


Steps to Reproduce:
1.Open the osinfo file 
2.change os.windows_8.devices.display.protocols.value = vnc/cirrus
to
os.windows_8.devices.display.protocols.value = aaa/bbb
3.restart ovirt-engine service 
4.try to create a new VM


Actual results:
An exception is thrown , most fields in the New VM dialog displayed with blank data 

Expected results:
Basic validation should be performed in order to handle illegal data properly

Additional info:

This is general for the whole osinfo file settings , the display value that was changed is just an example but this will occur with other entries as well

Comment 1 Itamar Heim 2014-01-26 08:10:30 UTC
Setting target release to current version for consideration and review. please
do not push non-RFE bugs to an undefined target release to make sure bugs are
reviewed for relevancy, fix, closure, etc.

Comment 2 Michal Skrivanek 2014-01-29 15:37:19 UTC
IMHO on validation problem we should stop starting engine. It's basic config and if misconfigured we shouldn't risk wrong behavior

Comment 3 Sandro Bonazzola 2014-03-04 09:17:51 UTC
This is an automated message.
Re-targeting all non-blocker bugs still open on 3.4.0 to 3.4.1.

Comment 4 Omer Frenkel 2014-10-29 15:55:01 UTC
Roy, do we want this in ovirt 3.5.1 (current target)?
if so, backports are missing..
if not, please re-target to 3.6

Comment 5 Roy Golan 2014-11-11 10:31:22 UTC
(In reply to Omer Frenkel from comment #4)
> Roy, do we want this in ovirt 3.5.1 (current target)?
> if so, backports are missing..
> if not, please re-target to 3.6

done

Comment 6 Sandro Bonazzola 2015-01-15 14:14:47 UTC
This is an automated message: 
This bug should be fixed in oVirt 3.5.1 RC1, moving to QA

Comment 7 Sandro Bonazzola 2015-01-21 16:02:35 UTC
oVirt 3.5.1 has been released. If problems still persist, please make note of it in this bug report.


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