Bug 1093002 - fail engine startup on incorrect values in osinfo
Summary: fail engine startup on incorrect values in osinfo
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine
Version: 3.4.0
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: ovirt-3.6.0-rc
: 3.6.0
Assignee: Michal Skrivanek
QA Contact: Nisim Simsolo
URL:
Whiteboard:
Depends On: 1056965 1207240
Blocks: 1174126
TreeView+ depends on / blocked
 
Reported: 2014-04-30 12:00 UTC by Lukas Svaty
Modified: 2016-04-20 01:37 UTC (History)
13 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1174126 (view as bug list)
Environment:
Last Closed: 2016-04-20 01:37:13 UTC
oVirt Team: Virt
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
engine log of login action to WA portal (12.04 KB, text/x-log)
2014-04-30 12:04 UTC, Lukas Svaty
no flags Details
engine log (2.43 MB, text/plain)
2015-06-01 13:40 UTC, Nisim Simsolo
no flags Details


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 36082 0 None None None Never

Description Lukas Svaty 2014-04-30 12:00:39 UTC
Description of problem:
After clean installation of rhevm av7 I am unable to create VM, as in webadmin portal appropriate fields are not populating like cluster or operation system. Tried this with installing av6 and updating to av7 and same behaviour occured on editing VMs.

Version-Release number of selected component (if applicable):
Linux `hostname` 2.6.32-431.11.2.el6.x86_64 #1 SMP Mon Mar 3 13:32:45 EST 2014 x86_64 x86_64 x86_64 GNU/Linux
Red Hat Enterprise Linux Server release 6.5 (Santiago)
rhevm - av7

How reproducible:
100%

Steps to Reproduce:
1. have really old VM of RHEL6.5 fully updated
2. install rhevm 3.4 - av7
3. Login to WA portal and see ERROR in log in additional info:

Actual results:
ERROR on login for missing enum

Additional info:
engine log after login:
2014-04-30 13:51:22,952 INFO  [org.ovirt.engine.core.bll.LoginAdminUserCommand] (ajp-/127.0.0.1:8702-8) Running command: LoginAdminUserCommand internal: false.
2014-04-30 13:51:22,957 INFO  [org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector] (ajp-/127.0.0.1:8702-8) Correlation ID: null, Call Stack: null, Custom Event ID: -1, Message: User admin logged in.
2014-04-30 13:51:23,038 ERROR [org.ovirt.engine.core.bll.OsRepositoryQuery] (ajp-/127.0.0.1:8702-1) Query OsRepositoryQuery failed. Exception message is No enum constant org.ovirt.engine.core.common.businessentities.ArchitectureType.x86 : java.lang.IllegalArgumentException: No enum constant 

full engine.log attached

Comment 1 Lukas Svaty 2014-04-30 12:04:34 UTC
Created attachment 891168 [details]
engine log of login action to WA portal

Comment 2 Roy Golan 2014-05-04 07:12:22 UTC
architecture is either x86_64 or ppc64.

can you output your /etc/ovirt-engine/osinfo.conf.d files?

or just grep cpuArch /etc/ovirt-engine/osinfo.conf.d/*

Comment 3 Lukas Svaty 2014-05-06 13:43:00 UTC
[] - ll /etc/ovirt-engine/osinfo.conf.d

lrwxrwxrwx. 1 root root  55 Apr 25 17:24 00-defaults.properties -> /usr/share/ovirt-engine/conf/osinfo-defaults.properties
lrwxrwxrwx. 1 root root   1 Apr 18 12:16 01-link-to-nowhere.properties -> a
lrwxrwxrwx. 1 root root   9 Apr 18 12:33 02-link-to-dev-null.properties -> /dev/null
lrwxrwxrwx. 1 root root  35 Apr 18 12:34 03-link-to-binary.properties -> /boot/vmlinuz-2.6.32-431.el6.x86_64
-rw-r--r--. 1 root root   0 Apr 18 12:34 04-empty.properties
-rw-r--r--. 1 root root  99 Apr 18 12:36 05-encoding.properties
-rw-r--r--. 1 root root  40 Apr 18 12:37 06-overridesectvalues.properties
-rw-r--r--. 1 root root  40 Apr 18 12:41 07-overridesectvalues.properties
-rw-r--r--. 1 root root 133 Apr 18 12:41 08-set-derive.properties
-rw-r--r--. 1 root root 157 Apr 18 12:42 09-nonexist-derive.properties
-rw-r--r--. 1 root root 954 Apr 18 12:42 10-duplicate.properties
--w-------. 1 root root   0 Apr 18 12:43 11-noread.properties
-rw-r--r--. 1 root root 124 Apr 18 12:43 13-used.property

[] - cd /etc/ovirt-engine/osinfo.d && cpuArch *
00-defaults.properties:os.other.cpuArchitecture.value = x86_64
00-defaults.properties:os.other_ppc64.cpuArchitecture.value = ppc64
grep: 01-link-to-nowhere.properties: No such file or directory
10-duplicate.properties:os.Solaris.cpuArchitecture.value = x86
10-duplicate.properties:os.Solaris.cpuArchitecture.value = x86

Comment 4 Michal Skrivanek 2014-05-07 06:36:27 UTC
@Lukas, then this is not a clean installation.

@Roy, as we talked for other properties before, please crash/exit on startup when some fields are missing/duplicate/not perfect. It's admin's editing fault and we don't want to let know that the values are wrong as soon as possible.

Comment 5 Lukas Svaty 2014-05-07 11:06:52 UTC
Michal on the previouse engine os.info was tested as you see in comment 3
afterwards engine-cleanup && engine-setup.
Shouldn't /etc/ovirt-engine/os-info.con.d/* be overwritten with new installation?

Comment 6 Michal Skrivanek 2014-05-07 13:33:27 UTC
well, no, apparently:)
it's not a clean installation anymore. whether it should or should not be that's a different matter…
it likely overwrote the defaults file, but not the others custom-added. It's not a good policy to overwrite files which are not yours so I'd say this is an expected behavior

Comment 7 Michal Skrivanek 2014-05-15 07:04:05 UTC
(which also menas the bug has lower prio/sev)

Comment 8 Michal Skrivanek 2014-11-10 11:54:00 UTC
merged to ovirt-3.5 upstream

Comment 9 Lukas Svaty 2014-12-03 10:35:35 UTC
verified in vt12

Comment 10 Michal Skrivanek 2014-12-15 08:34:20 UTC
feature was reverted for 3.5 GA and a new implementation has been posted

Comment 12 Juan Hernández 2015-05-18 12:14:46 UTC
This has been fixed in JBoss EAP 6.4.1, there is no change to do in the engine.

Comment 13 Nisim Simsolo 2015-06-01 13:38:13 UTC
Not Fixed.
1. oVirt Engine Version: 3.6.0-0.0.master.20150519172219.git9a2e2b3.el6

Testing procedure:
1. Change /etc/ovirt-engine/osinfo.conf.d/00-defaults.properties
   os.other.bus.value from 64 to 6444
2. Restart ovirt-engine service
Actual result: 
oVirt engine is up and webadmin portal is unavailable.
Next ERROR observed in engine.log:
2015-06-01 16:29:10,262 ERROR [org.ovirt.engine.core.bll.Backend] (MSC service thread 1-2) [] Error during initialization: java.lang.Runtime
Exception: osinfo properties syntax error: /etc/ovirt-engine/osinfo.conf.d/00-defaults.properties: 49, 21: error: Encountered " <INT> "6444 
"" at line 49, column 22.


Server log attached (engine.log06012015)

Comment 14 Nisim Simsolo 2015-06-01 13:40:31 UTC
Created attachment 1033356 [details]
engine log

Comment 15 Michal Skrivanek 2015-06-01 13:55:12 UTC
see 3.5.z clone for details

Comment 16 Nisim Simsolo 2015-06-08 14:46:26 UTC
Verified. After the next ERROR occurs, application deployment stopped:
2015-06-08 17:20:21,998 ERROR [org.ovirt.engine.core.bll.Backend] (MSC service thread 1-2) [] Error during initialization: java.lang.RuntimeException: osinfo properties syntax error: /etc/ovirt-engine/osinfo.conf.d/00-defaults.properties: 49, 21: error: Encountered " <INT> "64111 "" at line 49, column 22.
Was expecting one of:
    <WS> ...
    <BUS_WIDTH> ...


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