Bug 996055

Summary: engine does not log osinfo file having already used id.value
Product: Red Hat Enterprise Virtualization Manager Reporter: Jiri Belka <jbelka>
Component: ovirt-engineAssignee: Roy Golan <rgolan>
Status: CLOSED CURRENTRELEASE QA Contact: sefi litmanovich <slitmano>
Severity: low Docs Contact:
Priority: unspecified    
Version: unspecifiedCC: amureini, istein, lpeer, michal.skrivanek, rbalakri, Rhev-m-bugs, slitmano, srevivo
Target Milestone: ovirt-3.6.0-rc   
Target Release: 3.6.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: ovirt-3-6-0-2 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-04-20 01:11:49 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Virt RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

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.