Version number is not reported properly by the Hyper-V driver

Bug #1409258 reported by Alessandro Pilotti
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Medium
Claudiu Belu

Bug Description

Nova expects the hypervisor version to be reported as an int.

Although undocumented, the int is converted back to a version number x.y.z by splitting the int in groups of 3 decimal digits:
See: https://github.com/openstack/nova/blob/master/nova/utils.py#L1016

The hyper-v driver reports the OS version by removing the "." in the version, so 6.3.9600 (Hyper-V 2012 R2) becomes 639600, which once translated becomes 639.600, which is incorrect.

This is needed by image scheduler filters that use "requests_hypervisor_version=x.y.z" to request a minimum hypervisor version.

Tags: hyper-v
Claudiu Belu (cbelu)
Changed in nova:
assignee: nobody → Claudiu Belu (cbelu)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

Fix proposed to branch: master
Review: https://review.openstack.org/146274

Changed in nova:
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/146274
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=673221b2384c9e792c2d9be5192bb341a01857e8
Submitter: Jenkins
Branch: master

commit 673221b2384c9e792c2d9be5192bb341a01857e8
Author: Claudiu Belu <email address hidden>
Date: Sat Jan 10 14:47:39 2015 +0200

    Hyper-V: Fixes wrong hypervisor_version

    The hypervisor_version will be stored in the database as
    an Integer and it will be used by the scheduler, if required
    by the image property 'hypervisor_version_requires'.

    The hypervisor_version will then be converted back to a version
    by spliting the int in groups of 3 digits.
    E.g.: hypervisor_version 6003 is converted to '6.3'.

    Currently, the reported hypervisor_version by the Hyper-V driver
    is wrong. For example, for Windows Hyper-V / Server 2012 R2
    or Windows 8.1, the hypervisor_version reported is '639600',
    which will later be converted to 639.600 by the scheduler.

    Closes-Bug: #1409258

    Change-Id: Id991fefed08d1da2a68db4c27de72ac2252b1781

Changed in nova:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in nova:
milestone: none → kilo-2
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: kilo-2 → 2015.1.0
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.