Bug 1368134 - The Host OS version parts are not reported
Summary: The Host OS version parts are not reported
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: RestAPI
Version: 4.1.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ovirt-4.0.4
: 4.0.4
Assignee: Moti Asayag
QA Contact: Petr Kubica
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-08-18 13:49 UTC by Moti Asayag
Modified: 2016-09-26 12:39 UTC (History)
3 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2016-09-26 12:39:22 UTC
oVirt Team: Infra
Embargoed:
rule-engine: ovirt-4.0.z+
rule-engine: ovirt-4.1+
rule-engine: planning_ack+
mperina: devel_ack+
pstehlik: testing_ack+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 62626 0 master MERGED core: Move OS class to utils for reusability 2016-08-24 14:19:51 UTC
oVirt gerrit 62627 0 master MERGED core,restapi: Report version parts for host's os element 2016-08-24 14:19:46 UTC
oVirt gerrit 62812 0 ovirt-engine-4.0 MERGED core: Move OS class to utils for reusability 2016-08-25 11:18:55 UTC
oVirt gerrit 62813 0 ovirt-engine-4.0 MERGED core,restapi: Report version parts for host's os element 2016-08-25 13:22:57 UTC

Description Moti Asayag 2016-08-18 13:49:08 UTC
Description of problem:
The reported Host OS value by the engine failed parsing by the host-resource, therefore only the 'full_version' of the Host OS is being reported.

Version-Release number of selected component (if applicable):
master

How reproducible:
Always

Steps to Reproduce:
1. Send GET request to 
2. Examine the <os> element in the response.

Actual results:
The reported Host OS element looks like:
<os type="RHEL">
  <version full_version="7.2 - 9.el7"/>
</os>

Expected results:
The <os><version></version></os> should include the version parts:
<major/><minor/><release/><build/>

Additional info:

Here are several formats of the reported Host OS to be parsed:

    for rhel:
    RHEL - 7.2 - 9.el7
    RHEL - 7 - 1.1503.el7.centos.2.8
     
    ovirt-node:
    oVirt Node - 3.6 - 0.999.201608161021.el7.centos
     
    for RHEV-H:
    RHEV Hypervisor - 7.2 - 20160711.0.el7ev

Comment 1 Red Hat Bugzilla Rules Engine 2016-08-18 13:54:33 UTC
Target release should be placed once a package build is known to fix a issue. Since this bug is not modified, the target version has been reset. Please use target milestone to plan a fix for a oVirt release.

Comment 2 Petr Kubica 2016-09-13 18:21:04 UTC
I get this [1] output from API but there isn't <release/> tag as mentioned in description, is it okay?

[1]
<os>
  <custom_kernel_cmdline/>
  <reported_kernel_cmdline>BOOT_IMAGE=/vmlinuz-3.10.0-327.22.2.el7.x86_64 root=/dev/mapper/rootvg-lv_root ro consoleblank=0 crashkernel=auto rd.lvm.lv=rootvg/lv_root rd.lvm.lv=rootvg/lv_swap rhgb quiet LANG=en_US.UTF-8
  </reported_kernel_cmdline>
  <type>RHEL</type>
  <version>
    <full_version>7.2 - 9.el7</full_version>
    <major>7</major>
    <minor>2</minor>
  </version>
</os>

Comment 3 Martin Perina 2016-09-14 08:17:45 UTC
Only major and minor are shown in API, if user wants to check release, he had to use full_version, because there is no consistent/unified way how to parse/report release, because release is specific for each OS.

Comment 4 Petr Kubica 2016-09-14 08:41:13 UTC
Verified in ovirt-engine-restapi-4.0.4.1-0.1.el7ev.noarch


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