nova-status: require placement >= 1.4

Since Ia1a0066dc30025c02553584a077365b28d8ff80e FilterScheduler will
no longer fall back to not using placement API. We need to require
version 1.4 to prevent NoValidHost errors.

Closes-Bug: #1669433

Change-Id: I6666cb2f558ed1f4e83f21e0317a206b07c25134
This commit is contained in:
Roman Podoliaka 2017-03-06 12:45:51 +02:00
parent edf51119fa
commit a17851ab0a
4 changed files with 13 additions and 7 deletions

View File

@ -95,6 +95,11 @@ Upgrade
Placement service. More information on the Placement service can be found
at: `<http://docs.openstack.org/developer/nova/placement.html>`_
**16.0.0 (Pike)**
* Checks for the Placement API are modified to require version 1.4, that
is needed in Pike and further for nova-scheduler to work correctly.
SEE ALSO
========

View File

@ -201,10 +201,9 @@ class UpgradeCommands(object):
try:
versions = self._placement_get("/")
max_version = float(versions["versions"][0]["max_version"])
# The required version is a bit tricky but we know that we at least
# need 1.0 for Newton computes. This minimum might change in the
# future.
needs_version = 1.0
# NOTE(rpodolyaka): 1.4 is needed in Pike and further as
# FilterScheduler will no longer fall back to not using placement
needs_version = 1.4
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.0",
"max_version": "1.4",
"id": "v1.0"
}
]
@ -231,7 +231,7 @@ class TestPlacementCheck(test.NoDBTestCase):
}
res = self.cmd._check_placement()
self.assertEqual(status.UpgradeCheckCode.FAILURE, res.code)
self.assertIn('Placement API version 1.0 needed, you have 0.9',
self.assertIn('Placement API version 1.4 needed, you have 0.9',
res.details)

View File

@ -4,3 +4,5 @@ upgrade:
placement service during instance boot if old computes were
running. That compatibility mode is no longer present in Pike, and
as such, the scheduler fully depends on the placement service.
This effectively means that in Pike Nova requires Placement API
version 1.4 (Ocata).