Reviewed: https://review.openstack.org/449119 Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=b2b366aa4aa2b5199ddbd8cd51019f3d8b7bccc3 Submitter: Jenkins Branch: master
commit b2b366aa4aa2b5199ddbd8cd51019f3d8b7bccc3 Author: Chris Dent <cd...@anticdent.org> Date: Thu Mar 23 12:33:00 2017 +0000 [placement] Don't use floats in microversion handling When microversioned request handling was added to placement some comparisons were added that treat the microversions as floats. This will break as soon as the right hand side of the version chnages from one digit to two. A float of 1.1 and 1.10 is the same. A version string of '1.1' and '1.10' is not. This patch changes the internals of version handling to always use Version objects which represent the versions using a name tuple (major=1, minor=10). It also changes the externals to expect versions as strings ('1.10'). Where floats were present before, these have been changed to strings. Where tuples have been accepted, these are still accepted, but strings are as well. This is an internal only change, users shouldn't notice any difference as their versions (in the openstack-api-version header) were always strings and we haven't made it to version 1.10, sorry '1.10', yet. If developers try to version_handler with something other than a version string, test runs will fail very early (at import time). Change-Id: Ic2b655ac4c75c6104eddecd174f193413a0764d2 Closes-Bug: #1675143 ** Changed in: nova Status: In Progress => Fix Released -- You received this bug notification because you are a member of Yahoo! Engineering Team, which is subscribed to OpenStack Compute (nova). https://bugs.launchpad.net/bugs/1675143 Title: placement microversion comparisons are sometimes floats Status in OpenStack Compute (nova): Fix Released Bug description: In a few different places in the placement API (as of version 1.5) there are microversion comparisons which are based on floats. This means that version 1.20 will evaluate as "older" than 1.3, which totally wrong. This is pretty much my bad, so I'm glad I noticed just now. We've got a bit of time to fix this (before 1.10) comes along, but should get to it soon. Sigh. To manage notifications about this bug go to: https://bugs.launchpad.net/nova/+bug/1675143/+subscriptions -- Mailing list: https://launchpad.net/~yahoo-eng-team Post to : yahoo-eng-team@lists.launchpad.net Unsubscribe : https://launchpad.net/~yahoo-eng-team More help : https://help.launchpad.net/ListHelp