Skip to content

Commit 3ada047

Browse files
Zuulopenstack-gerrit
authored andcommitted
Merge "Fix rebuild compute RPC API exception for rolling-upgrades" into stable/zed
2 parents db13816 + 1b9c4c7 commit 3ada047

File tree

2 files changed

+3
-10
lines changed

2 files changed

+3
-10
lines changed

nova/compute/manager.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3637,7 +3637,7 @@ def rebuild_instance(self, context, instance, orig_image_ref, image_ref,
36373637
bdms, recreate, on_shared_storage,
36383638
preserve_ephemeral, migration,
36393639
scheduled_node, limits, request_spec, accel_uuids,
3640-
reimage_boot_volume):
3640+
reimage_boot_volume=None):
36413641
"""Destroy and re-make this instance.
36423642

36433643
A 'rebuild' effectively purges all existing data from the system and
@@ -3671,7 +3671,7 @@ def rebuild_instance(self, context, instance, orig_image_ref, image_ref,
36713671
:param accel_uuids: a list of cyborg ARQ uuids
36723672
:param reimage_boot_volume: Boolean to specify whether the user has
36733673
explicitly requested to rebuild a boot
3674-
volume
3674+
volume or None if RPC version is <=6.0
36753675

36763676
"""
36773677
# recreate=True means the instance is being evacuated from a failed

nova/tests/functional/regressions/test_bug_2040264.py

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
# under the License.
1212

1313
from nova.tests import fixtures as nova_fixtures
14-
from nova.tests.functional.api import client
1514
from nova.tests.functional import integrated_helpers
1615

1716

@@ -46,13 +45,7 @@ def _test_rebuild_instance_with_compute_rpc_pin(self, version_cap):
4645

4746
# We automatically pin to 6.0 if old computes are Yoga or older.
4847
def test_rebuild_instance_6_0(self):
49-
e = self.assertRaises(client.OpenStackApiException,
50-
self._test_rebuild_instance_with_compute_rpc_pin, '6.0')
51-
self.assertEqual(500, e.response.status_code)
52-
# NOTE(sbauza): This returns a TypeError because of
53-
# 'reimage_boot_volume' and 'target_state' parameters missing from the
54-
# rcpapi caller.
55-
self.assertIn('TypeError', e.response.text)
48+
self._test_rebuild_instance_with_compute_rpc_pin('6.0')
5649

5750
# We automatically pin to 6.1 if old computes are Zed.
5851
def test_rebuild_instance_6_1(self):

0 commit comments

Comments
 (0)