diff --git a/nova/compute/manager.py b/nova/compute/manager.py index 6436440a5692..bff5e27270b1 100644 --- a/nova/compute/manager.py +++ b/nova/compute/manager.py @@ -3320,7 +3320,8 @@ class ComputeManager(manager.Manager): injected_files, new_pass, orig_sys_metadata, bdms, recreate, on_shared_storage, preserve_ephemeral, migration, - scheduled_node, limits, request_spec, accel_uuids): + scheduled_node, limits, request_spec, + accel_uuids=None): """Destroy and re-make this instance. A 'rebuild' effectively purges all existing data from the system and @@ -3351,7 +3352,8 @@ class ComputeManager(manager.Manager): :param limits: Overcommit limits set by the scheduler. If a host was specified by the user, this will be None :param request_spec: a RequestSpec object used to schedule the instance - :param accel_uuids: a list of cyborg ARQ uuids. + :param accel_uuids: a list of cyborg ARQ uuids or None if the RPC API + is <=5.11 """ # recreate=True means the instance is being evacuated from a failed diff --git a/nova/tests/functional/regressions/test_bug_1902925.py b/nova/tests/functional/regressions/test_bug_1902925.py index 28bef9a031aa..fb5f5251e54a 100644 --- a/nova/tests/functional/regressions/test_bug_1902925.py +++ b/nova/tests/functional/regressions/test_bug_1902925.py @@ -9,7 +9,6 @@ # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License. -from nova.tests.functional.api import client from nova.tests.functional import integrated_helpers from nova.tests.unit import cast_as_call @@ -39,14 +38,7 @@ class ComputeVersion5xPinnedRpcTests(integrated_helpers._IntegratedTestBase): }}) def test_rebuild_instance_5_0(self): - e = self.assertRaises(client.OpenStackApiException, - self._test_rebuild_instance_with_compute_rpc_pin, '5.0') - self.assertEqual(500, e.response.status_code) - # NOTE(sbauza): It provides a TypeError because of 'accel_uuids' - # parameter missing - # TypeError: rebuild_instance() missing 1 required positional argument: - # 'accel_uuids' - self.assertIn('TypeError', e.response.text) + self._test_rebuild_instance_with_compute_rpc_pin('5.0') def test_rebuild_instance_5_12(self): self._test_rebuild_instance_with_compute_rpc_pin('5.12') diff --git a/releasenotes/notes/bug_1902925-351f563340a1e9a5.yaml b/releasenotes/notes/bug_1902925-351f563340a1e9a5.yaml new file mode 100644 index 000000000000..5e3fc7b9e000 --- /dev/null +++ b/releasenotes/notes/bug_1902925-351f563340a1e9a5.yaml @@ -0,0 +1,11 @@ +--- + +fixes: + - | + When upgrading compute services from Ussuri to Victoria each by one, the + Compute RPC API was pinning to 5.11 (either automatically or by using + the specific rpc version in the option) but when rebuilding an instance, + a TypeError was raised as an argument was not provided. This error is + fixed by `bug 1902925`_. + + .. _bug 1902925: https://bugs.launchpad.net/nova/+bug/1902925/