Bug 980879

Summary: osinfo file - deriving properties from NON-existing section causes 'General command validation failure.' in UI
Product: Red Hat Enterprise Virtualization Manager Reporter: Jiri Belka <jbelka>
Component: ovirt-engineAssignee: Shahar Havivi <shavivi>
Status: CLOSED CURRENTRELEASE QA Contact: Pavel Novotny <pnovotny>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 3.3.0CC: acathrow, iheim, jkt, lpeer, mavital, michal.skrivanek, pstehlik, Rhev-m-bugs, shavivi, yeylon
Target Milestone: ---   
Target Release: 3.4.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: virt
Fixed In Version: ovirt-3.4.0-alpha1 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-06-12 14:06:28 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1078909, 1142926    
Attachments:
Description Flags
engine.log none

Description Jiri Belka 2013-07-03 12:25:15 UTC
Created attachment 768238 [details]
engine.log

Description of problem:

when one defines a osinfo section deriving rest of property values from non-existent section, this "inconsistent" section is accepted and displayed in UI in 'Operating Systems'.

Selecting this operating system type for new VM causes following error in UI.

~~~
Error while executing action:

oi:

    General command validation failure.
~~~

I would say if a section is deriving property data from another section which do not exist, it should be ignored completely.

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

How reproducible:
100%

Steps to Reproduce:
1.
~~~
cat > $ENGINE_ETC/conf/osinfo.conf.d/09-sectdevirenonexistvalues.properties << _EOF
os.OpenIndiana.id.value = 999
os.OpenIndiana.name.value = OpenIndiana
os.OpenIndiana.devices.network.value = e1000
os.OpenIndiana.derivedFrom.value = Foobar
_EOF
~~~
2. restart engine
3. create new VM while selecting OpenIndiana as Operating System in VM properties

Actual results:
error, "inconsistent" osinfo section is accepted

Expected results:
ignore "inconsistent" osinfo section

Additional info:

start checking log file since following line

2013-07-03 12:16:48,038 INFO  [org.ovirt.engine.core.utils.osinfo.OsInfoPreferencesLoader] (ServerService Thread Pool -- 38) Loaded file /etc/ovirt-engine/osinfo.conf.d/09-sectdevirenonexistvalues.properties

n

Comment 1 Michal Skrivanek 2013-07-04 05:54:24 UTC
I think it should be either ignored completely or engine should fail to start

Comment 2 Jiri Belka 2013-08-12 10:03:04 UTC
Same issue with is9.1 with following scenario.

cat > /etc/ovirt-engine/osinfo.conf.d/08-sectderiveexistvalues.properties << _EOF
os.OpenBSD.id.value = 666
os.OpenBSD.name.value = OpenBSD
os.OpenBSD.devices.network.value = pv
os.OpenBSD.derivedFrom.value = Other
_EOF

New VM with OpenBSD 'Operating System' cannot be created:

General command validation failure.

Comment 3 Michal Skrivanek 2013-09-17 07:23:15 UTC
this is only in case user adds own config

Comment 4 Shahar Havivi 2013-09-17 08:45:44 UTC
patch sent at:
http://gerrit.ovirt.org/#/c/19314/

Comment 6 Jiri Belka 2013-12-04 14:28:58 UTC
in is25 error msg in UI is:

'Error while executing action New VM from Blank Template: Internal Engine Error' in UI.

Comment 7 Shahar Havivi 2013-12-05 12:35:30 UTC
(In reply to Jiri Belka from comment #6)
> in is25 error msg in UI is:
> 
> 'Error while executing action New VM from Blank Template: Internal Engine
> Error' in UI.

Please provide more information,
Can you please provide the Engine log.

Comment 8 Sandro Bonazzola 2014-01-14 08:44:11 UTC
ovirt 3.4.0 alpha has been released

Comment 9 Pavel Novotny 2014-02-18 14:51:29 UTC
Verified upstream in ovirt-engine-3.4.0-0.7.beta2.el6.noarch.

Verification steps:
1. On oVirt Engine do:
-~-
cat > /etc/ovirt-engine/osinfo.conf.d/08-sectderiveexistvalues.properties << _EOF
os.OpenBSD.id.value = 666
os.OpenBSD.name.value = OpenBSD
os.OpenBSD.devices.network.value = pv
os.OpenBSD.derivedFrom.value = Other
_EOF
-~-
2. Restart ovirt-engine service.
3. Check engine.log file. Search for text "Loaded file /etc/ovirt-engine/osinfo.conf.d
/08-sectderiveexistvalues.properties".
4. In UI try to create VM with operating system "OpenBSD".

Results:
3. engine.log now says "Illegal parent for os: OpenBSD":
-~-
2014-02-18 15:34:06,675 INFO  [org.ovirt.engine.core.utils.osinfo.OsInfoPreferencesLoader] (MSC service thread 1-2) Loaded file /etc/ovirt-engine/osinfo.conf.d
/08-sectderiveexistvalues.properties
2014-02-18 15:34:06,721 WARN  [org.ovirt.engine.core.utils.OsRepositoryImpl] (MSC service thread 1-2) Illegal parent for os: OpenBSD
-~-
4. No "OpenBSD" option is shown in Operating System select box.

Comment 11 Itamar Heim 2014-06-12 14:06:28 UTC
Closing as part of 3.4.0