From 42effa4ca6eefb5925146877f5ee92e5101943db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Dulko?= Date: Mon, 19 Sep 2016 14:42:35 +0200 Subject: [PATCH] Fix request_spec conversion from o.vo to dict Turns out I7dae83667a1aca92c552fbfaa1e90c6558e293bf had a mistake and was unconditionally converting RequestSpec o.vo to dictionary just before sending it to the scheduler. This wasn't noticed as scheduler manager has compatibility shim in place that converts the dictionary back into o.vo when it's received. The problem this produces is that we cannot drop the compatibility shim from manager until 4.0 scheduler RPC API. This commit fixes that. Change-Id: I7beaaddcff079dfe7a0032e2cf2afa75a5e88522 Closes-Bug: 1625170 (cherry picked from commit 32bfddf841ec2b15f022af2bb0e7666af0bc4777) --- cinder/scheduler/rpcapi.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/cinder/scheduler/rpcapi.py b/cinder/scheduler/rpcapi.py index 103a892ad79..0608fb07e04 100644 --- a/cinder/scheduler/rpcapi.py +++ b/cinder/scheduler/rpcapi.py @@ -112,9 +112,8 @@ class SchedulerAPI(rpc.RPCAPI): def create_volume(self, ctxt, topic, volume_id, snapshot_id=None, image_id=None, request_spec=None, filter_properties=None, volume=None): - request_spec_p = jsonutils.to_primitive(request_spec) msg_args = {'snapshot_id': snapshot_id, 'image_id': image_id, - 'request_spec': request_spec_p, + 'request_spec': request_spec, 'filter_properties': filter_properties, 'volume': volume} version = self._compat_ver('3.0', '2.2', '2.0') if version in ('2.2', '2.0'):