Merge "Update nova-status and docs for required placement 1.24"

This commit is contained in:
Zuul 2018-05-19 01:55:33 +00:00 committed by Gerrit Code Review
commit 777182c742
4 changed files with 18 additions and 7 deletions

View File

@ -106,7 +106,7 @@ Upgrade
**18.0.0 (Rocky)**
* Checks for the Placement API are modified to require version 1.21.
* Checks for the Placement API are modified to require version 1.24.
* Checks that ironic instances have had their embedded flavors migrated to
use custom resource classes.
* Checks for ``nova-osapi_compute`` service versions that are less than 15

View File

@ -55,9 +55,11 @@ changed or be partially complete at this time.
* `Scheduler claiming resources to the Placement API <http://specs.openstack.org/openstack/nova-specs/specs/pike/approved/placement-claims.html>`_
* `The Traits API - Manage Traits with ResourceProvider <http://specs.openstack.org/openstack/nova-specs/specs/pike/approved/resource-provider-traits.html>`_
* `Request Traits During Scheduling`_
* `filter allocation candidates by aggregate membership`_
.. _Nested Resource Providers: http://specs.openstack.org/openstack/nova-specs/specs/queens/approved/nested-resource-providers.html
.. _Request Traits During Scheduling: https://specs.openstack.org/openstack/nova-specs/specs/queens/approved/request-traits-in-nova.html
.. _filter allocation candidates by aggregate membership: https://specs.openstack.org/openstack/nova-specs/specs/rocky/approved/alloc-candidates-member-of.html
Deployment
==========
@ -278,6 +280,14 @@ Queens (17.0.0)
This means you must upgrade the placement service before upgrading any
*nova-scheduler* services to Queens.
Rocky (18.0.0)
~~~~~~~~~~~~~~
* The minimum Placement API microversion required by the *nova-scheduler*
service is ``1.24`` in order to
`filter allocation candidates by aggregate membership`_.
This means you must upgrade the placement service before upgrading any
*nova-scheduler* services to Rocky.
REST API
========

View File

@ -199,11 +199,12 @@ class UpgradeCommands(object):
versions = self._placement_get("/")
max_version = pkg_resources.parse_version(
versions["versions"][0]["max_version"])
# NOTE(mriedem): 1.21 is required by nova-scheduler to be able
# to request aggregates.
# NOTE(mriedem): 1.24 is required by nova-scheduler to be able
# to request multiple member_of parameters to
# GET /allocation_candidates.
# NOTE: If you bump this version, remember to update the history
# section in the nova-status man page (doc/source/cli/nova-status).
needs_version = pkg_resources.parse_version("1.21")
needs_version = pkg_resources.parse_version("1.24")
if max_version < needs_version:
msg = (_('Placement API version %(needed)s needed, '
'you have %(current)s.') %

View File

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