Bug 1432488

Summary: [RFE] please use libosinfo/osinfo-db instead of osinfo-defaults.properties
Product: [oVirt] ovirt-engine Reporter: Pino Toscano <ptoscano>
Component: GeneralAssignee: bugs <bugs>
Status: CLOSED WONTFIX QA Contact:
Severity: low Docs Contact:
Priority: medium    
Version: futureCC: bugs, mtessun, rbarry
Target Milestone: ---Keywords: FutureFeature
Target Release: ---Flags: sbonazzo: ovirt-4.3-
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-11-20 20:08:07 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 Pino Toscano 2017-03-15 13:59:37 UTC
It looks like ovirt-engine has an own file defining OSes, and properties available in each of them.

OTOH, there is already a project called osinfo-db [1], which is an independent set of data files describing OSes, platforms, devices, and install scripts. There is also a GObject-based C library to interface with this data, libosinfo [2], which used to embed the data until an year ago or so.
This data is in use for years at least by virt-manager, to determine the default hardware to add to new guests, and in libguestfs, to identify ISOs.

Since osinfo-db is well maintained and generally kept up-to-date, it would be a better idea for ovirt-engine to switch over to it for OS information.
There are only two caveats:
- the need for compatibility mappings for numeric and string IDs
- manually carrying extra information not present in osinfo-db: they could be provided in the same format as XMLs, see the "ENTITY-NAME.d" part in the osinfo-db layout specification [3].

[1] https://gitlab.com/libosinfo/osinfo-db
[2] https://gitlab.com/libosinfo/libosinfo
[3] https://gitlab.com/libosinfo/libosinfo/blob/master/docs/database-layout.txt

Comment 1 Pino Toscano 2017-11-03 14:54:05 UTC
(In reply to Pino Toscano from comment #0)
> - manually carrying extra information not present in osinfo-db: they could
> be provided in the same format as XMLs, see the "ENTITY-NAME.d" part in the
> osinfo-db layout specification [3].
> 
> https://gitlab.com/libosinfo/libosinfo/blob/master/docs/database-layout.txt

Just to expand a bit more on this: gnome-boxes makes use of this system to set the logo for some types of guests, providing own XML data for them.  And since gnome-boxes uses libosinfo (via gnome-introspection), then the library already supports this kind of extra properties.

Comment 2 Ryan Barry 2018-11-20 20:08:07 UTC
See https://bugzilla.redhat.com/show_bug.cgi?id=1341161#c29

Moving to osinfo-db is unlikely and impractical given the current codebase. Let's investigate alternative solutions to update the operating system list.