Save hypervisor version as string rather than an integer

Registered by Aditi Raveesh

The hypervisor_version reported by vmwareapi, powervm, hyperv and the fake driver all use strings as their version number. Currently, the hypervisor_version is being saved as an integer in the compute_nodes table. It would be consistent and more convenient to store it as a string, which would avoid the need to convert it to int.

Related discussion can be found on:

Related mailing list discussion:

Blueprint information

Not started
Russell Bryant
Aditi Raveesh
Needs approval
Aditi Raveesh
Series goal:
Not started
Milestone target:

Related branches



The big concern with this is how comparisons(ordering) will be handled with strings. So this blueprint needs to address how that will be handled. It could be left up to individual drivers to handle it as long as the scheduler or any filters aren't reliant on hypervisor_version. Otherwise, as was mentioned in the email thread linked above there needs to be an assurance that the string can be mapped to ordinal numbers. --alaski

Currently, in case of xen hypervisor, the hypervisor version is used as an int while doing a version comparison. In other places, the version is converted from a string to an int, and then compared. An easier approach would be to keep this consistent: save the version as a string in the db (rather than as an int), and use string comparison, such as the method is_compatible from versionutils module to make any kind of version comparisons. This would eliminate the need of multiple conversion util methods such as convert_version_to_int, and would also help maintain consistent code.
Suggestions? --aditirav

deferred from icehouse-3 to "next":

Removed from next, as next is now reserved for near misses from the last milestone --johnthetubaguy


Work Items

This blueprint contains Public information 
Everyone can see this information.


No subscribers.