Bug 980879 - osinfo file - deriving properties from NON-existing section causes 'General command validation failure.' in UI
osinfo file - deriving properties from NON-existing section causes 'General c...
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine (Show other bugs)
3.3.0
Unspecified Unspecified
unspecified Severity medium
: ---
: 3.4.0
Assigned To: Shahar Havivi
Pavel Novotny
virt
:
Depends On:
Blocks: rhev3.4beta 1142926
  Show dependency treegraph
 
Reported: 2013-07-03 08:25 EDT by Jiri Belka
Modified: 2014-09-18 08:24 EDT (History)
10 users (show)

See Also:
Fixed In Version: ovirt-3.4.0-alpha1
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-06-12 10:06:28 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
engine.log (3.10 MB, text/plain)
2013-07-03 08:25 EDT, Jiri Belka
no flags Details


External Trackers
Tracker ID Priority Status Summary Last Updated
oVirt gerrit 19314 None None None Never

  None (edit)
Description Jiri Belka 2013-07-03 08:25:15 EDT
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 01:54:24 EDT
I think it should be either ignored completely or engine should fail to start
Comment 2 Jiri Belka 2013-08-12 06:03:04 EDT
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 03:23:15 EDT
this is only in case user adds own config
Comment 4 Shahar Havivi 2013-09-17 04:45:44 EDT
patch sent at:
http://gerrit.ovirt.org/#/c/19314/
Comment 6 Jiri Belka 2013-12-04 09:28:58 EST
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 07:35:30 EST
(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 03:44:11 EST
ovirt 3.4.0 alpha has been released
Comment 9 Pavel Novotny 2014-02-18 09:51:29 EST
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 10:06:28 EDT
Closing as part of 3.4.0

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