Require Placement 1.10 in nova-status upgrade check

The FilterScheduler is now using the GET /allocation_candidates
API from the Placement service which was added in microversion
1.10, and the nova-compute service is also going to rely on it
for updating allocations during move operations.

So this makes nova-status require Placement 1.10 as a minimum
for Pike. There are already release notes and some docs changes
mentioning that 1.10 is required for the scheduler and that
Placement should be upgraded before the scheduler, so another
release note is not added here.

Related to blueprint placement-claims

Change-Id: Iba0a734eb5535ec7cc394858ef15f6eebf8a9bde
This commit is contained in:
Matt Riedemann 2017-08-09 15:21:34 -04:00
parent f09ff27dff
commit 98246687d7
2 changed files with 6 additions and 5 deletions

View File

@ -203,9 +203,10 @@ class UpgradeCommands(object):
versions = self._placement_get("/")
max_version = pkg_resources.parse_version(
versions["versions"][0]["max_version"])
# NOTE(rpodolyaka): 1.4 is needed in Pike and further as
# FilterScheduler will no longer fall back to not using placement
needs_version = pkg_resources.parse_version("1.4")
# NOTE(rpodolyaka): 1.10 is needed in Pike and further as
# FilterScheduler requires GET /allocation_candidates in the
# Placement API.
needs_version = pkg_resources.parse_version("1.10")
if max_version < needs_version:
msg = (_('Placement API version %(needed)s needed, '
'you have %(current)s.') %

View File

@ -210,7 +210,7 @@ class TestPlacementCheck(test.NoDBTestCase):
"versions": [
{
"min_version": "1.0",
"max_version": "1.4",
"max_version": "1.10",
"id": "v1.0"
}
]
@ -251,7 +251,7 @@ class TestPlacementCheck(test.NoDBTestCase):
}
res = self.cmd._check_placement()
self.assertEqual(status.UpgradeCheckCode.FAILURE, res.code)
self.assertIn('Placement API version 1.4 needed, you have 0.9',
self.assertIn('Placement API version 1.10 needed, you have 0.9',
res.details)