Skip to content

Commit a806b1d

Browse files
Zuulopenstack-gerrit
authored andcommitted
Merge "Fix the compute RPC 5.12 issue" into stable/victoria
2 parents 9648d5c + a06e275 commit a806b1d

File tree

3 files changed

+16
-11
lines changed

3 files changed

+16
-11
lines changed

nova/compute/manager.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3325,7 +3325,8 @@ def rebuild_instance(self, context, instance, orig_image_ref, image_ref,
33253325
injected_files, new_pass, orig_sys_metadata,
33263326
bdms, recreate, on_shared_storage,
33273327
preserve_ephemeral, migration,
3328-
scheduled_node, limits, request_spec, accel_uuids):
3328+
scheduled_node, limits, request_spec,
3329+
accel_uuids=None):
33293330
"""Destroy and re-make this instance.
33303331

33313332
A 'rebuild' effectively purges all existing data from the system and
@@ -3356,7 +3357,8 @@ def rebuild_instance(self, context, instance, orig_image_ref, image_ref,
33563357
:param limits: Overcommit limits set by the scheduler. If a host was
33573358
specified by the user, this will be None
33583359
:param request_spec: a RequestSpec object used to schedule the instance
3359-
:param accel_uuids: a list of cyborg ARQ uuids.
3360+
:param accel_uuids: a list of cyborg ARQ uuids or None if the RPC API
3361+
is <=5.11
33603362

33613363
"""
33623364
# recreate=True means the instance is being evacuated from a failed

nova/tests/functional/regressions/test_bug_1902925.py

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
1010
# License for the specific language governing permissions and limitations
1111
# under the License.
12-
from nova.tests.functional.api import client
1312
from nova.tests.functional import integrated_helpers
1413
from nova.tests.unit import cast_as_call
1514

@@ -39,14 +38,7 @@ def _test_rebuild_instance_with_compute_rpc_pin(self, version_cap):
3938
}})
4039

4140
def test_rebuild_instance_5_0(self):
42-
e = self.assertRaises(client.OpenStackApiException,
43-
self._test_rebuild_instance_with_compute_rpc_pin, '5.0')
44-
self.assertEqual(500, e.response.status_code)
45-
# NOTE(sbauza): It provides a TypeError because of 'accel_uuids'
46-
# parameter missing
47-
# TypeError: rebuild_instance() missing 1 required positional argument:
48-
# 'accel_uuids'
49-
self.assertIn('TypeError', e.response.text)
41+
self._test_rebuild_instance_with_compute_rpc_pin('5.0')
5042

5143
def test_rebuild_instance_5_12(self):
5244
self._test_rebuild_instance_with_compute_rpc_pin('5.12')
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
3+
fixes:
4+
- |
5+
When upgrading compute services from Ussuri to Victoria each by one, the
6+
Compute RPC API was pinning to 5.11 (either automatically or by using
7+
the specific rpc version in the option) but when rebuilding an instance,
8+
a TypeError was raised as an argument was not provided. This error is
9+
fixed by `bug 1902925`_.
10+
11+
.. _bug 1902925: https://bugs.launchpad.net/nova/+bug/1902925/

0 commit comments

Comments
 (0)