Bug 996055 - engine does not log osinfo file having already used id.value
engine does not log osinfo file having already used id.value
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine (Show other bugs)
Unspecified Unspecified
unspecified Severity low
: ovirt-3.6.0-rc
: 3.6.0
Assigned To: Roy Golan
sefi litmanovich
Depends On:
  Show dependency treegraph
Reported: 2013-08-12 06:40 EDT by Jiri Belka
Modified: 2016-04-19 21:11 EDT (History)
8 users (show)

See Also:
Fixed In Version: ovirt-3-6-0-2
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2016-04-19 21:11:49 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: Virt
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

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

  None (edit)
Description Jiri Belka 2013-08-12 06:40:37 EDT
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):

How reproducible:

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
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 10:07:11 EDT
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 06:19:39 EST
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 05:24:38 EDT
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 06:33:23 EST
Verified with rhevm-

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.