Bump min placement microversion to 1.36

To implement the usage of same_subtree query parameter in the
allocation candidate request first the minimum requires placement
microversion needs to be bumped from 1.35 to 1.36. This patch makes such
bump and update the related nova upgrade check. Later patches will
modify the query generation to include the same_subtree param to the
request.

Change-Id: I5bfec9b9ec49e60c454d71f6fc645038504ef9ef
blueprint: qos-minimum-guaranteed-packet-rate
This commit is contained in:
Balazs Gibizer 2021-05-14 10:08:35 +02:00
parent 9de8bfb6e6
commit f6e8c512fb
6 changed files with 21 additions and 10 deletions

View File

@ -148,6 +148,10 @@ Upgrade
* Checks for computes older than the previous major release
* Checks for any instances without ``hw_machine_type`` set.
**24.0.0 (Xena)**
* Checks for the Placement API are modified to require version 1.36.
See Also
========

View File

@ -49,12 +49,12 @@ from nova.volume import cinder
CONF = nova.conf.CONF
# NOTE(efried): 1.35 is required by nova-scheduler to support the root_required
# queryparam to make GET /allocation_candidates require that a trait be present
# on the root provider, irrespective of how the request groups are specified.
# NOTE(gibi): 1.36 is required by nova-scheduler to support the same_subtree
# queryparam to make GET /allocation_candidates require that a list of request
# groups are satisfied from the same provider subtree.
# NOTE: If you bump this version, remember to update the history
# section in the nova-status man page (doc/source/cli/nova-status).
MIN_PLACEMENT_MICROVERSION = "1.35"
MIN_PLACEMENT_MICROVERSION = "1.36"
# NOTE(mriedem): 3.44 is needed to work with volume attachment records which
# are required for supporting multi-attach capable volumes.

View File

@ -42,7 +42,7 @@ from nova import utils
CONF = nova.conf.CONF
LOG = logging.getLogger(__name__)
WARN_EVERY = 10
ROOT_REQUIRED_VERSION = '1.35'
SAME_SUBTREE_VERSION = '1.36'
RESHAPER_VERSION = '1.30'
CONSUMER_GENERATION_VERSION = '1.28'
ALLOW_RESERVED_EQUAL_TOTAL_INVENTORY_VERSION = '1.26'
@ -292,7 +292,7 @@ class SchedulerReportClient(object):
"""
# Note that claim_resources() will use this version as well to
# make allocations by `PUT /allocations/{consumer_uuid}`
version = ROOT_REQUIRED_VERSION
version = SAME_SUBTREE_VERSION
qparams = resources.to_querystring()
url = "/allocation_candidates?%s" % qparams
resp = self.get(url, version=version,

View File

@ -1285,7 +1285,7 @@ class SchedulerReportClientTests(test.TestCase):
'CUSTOM_FOO'))
acs, _, ver = self.client.get_allocation_candidates(
self.context, utils.ResourceRequest.from_request_spec(req_spec))
self.assertEqual('1.35', ver)
self.assertEqual('1.36', ver)
# This prints which ddt permutation we're using if it fails.
self.assertEqual(data['expected_acs'], len(acs), data)

View File

@ -2124,7 +2124,7 @@ class TestProviderOperations(SchedulerReportClientTestCase):
expected_url = '/allocation_candidates?%s' % parse.urlencode(
expected_query)
self.ks_adap_mock.get.assert_called_once_with(
expected_url, microversion='1.35',
expected_url, microversion='1.36',
global_request_id=self.context.global_id)
self.assertEqual(mock.sentinel.alloc_reqs, alloc_reqs)
self.assertEqual(mock.sentinel.p_sums, p_sums)
@ -2168,7 +2168,7 @@ class TestProviderOperations(SchedulerReportClientTestCase):
expected_query)
self.assertEqual(mock.sentinel.alloc_reqs, alloc_reqs)
self.ks_adap_mock.get.assert_called_once_with(
expected_url, microversion='1.35',
expected_url, microversion='1.36',
global_request_id=self.context.global_id)
self.assertEqual(mock.sentinel.p_sums, p_sums)
@ -2194,7 +2194,7 @@ class TestProviderOperations(SchedulerReportClientTestCase):
res = self.client.get_allocation_candidates(self.context, resources)
self.ks_adap_mock.get.assert_called_once_with(
mock.ANY, microversion='1.35',
mock.ANY, microversion='1.36',
global_request_id=self.context.global_id)
url = self.ks_adap_mock.get.call_args[0][0]
split_url = parse.urlsplit(url)

View File

@ -0,0 +1,7 @@
---
upgrade:
- |
Nova now requires that the Placement API supports at least
microversion 1.36, added in Train. The related nova-upgrade
check has been modified to warn if this prerequisite is not
fulfilled.