diff --git a/doc/source/cli/nova-status.rst b/doc/source/cli/nova-status.rst index 6d50ccaf68..a198159e17 100644 --- a/doc/source/cli/nova-status.rst +++ b/doc/source/cli/nova-status.rst @@ -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 ======== diff --git a/nova/cmd/status.py b/nova/cmd/status.py index 2f14e3fed2..f95a1a4a93 100644 --- a/nova/cmd/status.py +++ b/nova/cmd/status.py @@ -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. diff --git a/nova/scheduler/client/report.py b/nova/scheduler/client/report.py index 257aaf07ca..c38d6e862f 100644 --- a/nova/scheduler/client/report.py +++ b/nova/scheduler/client/report.py @@ -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, diff --git a/nova/tests/functional/test_report_client.py b/nova/tests/functional/test_report_client.py index aea7ee56c5..83fe0f3ae5 100644 --- a/nova/tests/functional/test_report_client.py +++ b/nova/tests/functional/test_report_client.py @@ -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) diff --git a/nova/tests/unit/scheduler/client/test_report.py b/nova/tests/unit/scheduler/client/test_report.py index 887e05fa68..f8e9812b77 100644 --- a/nova/tests/unit/scheduler/client/test_report.py +++ b/nova/tests/unit/scheduler/client/test_report.py @@ -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) diff --git a/releasenotes/notes/require-placemnet-api-microversion-1.36-1129fe4afc949075.yaml b/releasenotes/notes/require-placemnet-api-microversion-1.36-1129fe4afc949075.yaml new file mode 100644 index 0000000000..b8d75876e8 --- /dev/null +++ b/releasenotes/notes/require-placemnet-api-microversion-1.36-1129fe4afc949075.yaml @@ -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.