Bug 996055 - engine does not log osinfo file having already used id.value
Summary: engine does not log osinfo file having already used id.value
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine
Version: unspecified
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: ovirt-3.6.0-rc
: 3.6.0
Assignee: Roy Golan
QA Contact: sefi litmanovich
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-08-12 10:40 UTC by Jiri Belka
Modified: 2016-04-20 01:11 UTC (History)
8 users (show)

Fixed In Version: ovirt-3-6-0-2
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-04-20 01:11:49 UTC
oVirt Team: Virt
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 31372 0 master ABANDONED core: osinfo - extract a validation method Never
oVirt gerrit 31373 0 master MERGED core: osinfo - fail backend startup on coliding os id error Never
oVirt gerrit 34740 0 ovirt-engine-3.5 MERGED core: osinfo - fail backend startup on coliding os id error Never

Description Jiri Belka 2013-08-12 10:40:37 UTC
Description of problem:

engine does not log osinfo file having already used id.value. event the file should be ignored, it should be logged, or not?

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

How reproducible:
100%

Steps to Reproduce:
1. cat > /etc/ovirt-engine/osinfo.conf.d/13-alreadyusedidvalue.property << _EOF
os.NetBSD.id.value = 0
os.NetBSD.name.value = NetBSD
os.NetBSD.network.value =  rtl8139
os.NetBSD.derivedFrom.value = Other
_EOF
2. service ovirt-engine restart
3. grep 'osinfo.*13-already' /var/log/ovirt-engine/engine.log

Actual results:
the file is ignored but not logged at log

Expected results:
should be logged probably

Additional info:
example of logged loading a binary osinfo file:
2013-08-12 12:30:20,341 ERROR [org.ovirt.engine.core.utils.osinfo.OsInfoPreferencesLoader] (ServerService Thread Pool -- 47) Failed loading file /etc/ovirt-engine/osinfo.conf.d/12-binaryfile.properties

Comment 1 Roy Golan 2013-08-13 14:07:11 UTC
I will add a verification  step once all is loaded as part of Bug 980879
and it would help me to log this problems as well

Comment 2 Michal Skrivanek 2014-01-31 11:19:39 UTC
you can just fail loading and exit everything if this happens. It means messing with config files and screwing them up…so as long as it is reported it's ok to not continue and exit the process

Comment 3 Roy Golan 2014-04-08 09:24:38 UTC
summing up: add a validation for the whole tree, make it extendible and blow the engine load if it fails

Comment 4 sefi litmanovich 2015-11-16 11:33:23 UTC
Verified with rhevm-3.6.0.3-0.1.el6.noarch.

added my property file to /etc/ovirt-engine/osinfo.conf.d with:

os.NetBSD.id.value = 5
os.NetBSD.name.value = NetBSD
os.NetBSD.derivedFrom.value = Other

which conflicts with id value of other_linux node.

restarted engine -> engine starts but fails to load configuration files with the following ERROR:

2015-11-16 12:06:28,581 ERROR [org.ovirt.engine.core.bll.Backend] (ServerService Thread Pool -- 57) [] Error during initialization: java.lang.RuntimeException: colliding os id 5 at node /os/other_linux/id
....very long trace..

Behaviour is as expected.
After removing my property file and restarting engine, engine was up and running as usual.


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