cinder.volume.rpcapi.create_volume does not convert the request_spec to
primitive before casting the request. This makes requests containing non
primitive types to fail. For example:
This will create a new database record and call create_volume on
volume.rpcapi. This will fail because VolumeMetadata won't be
serialized correctly when calling cast. This, however, is not True when
--source-volid is not passed because in such case,
scheduler.rpcpai.create_volume will be called, which converts
request_spec to primitive correctly.
Reviewed: https:/ /review. openstack. org/45861 github. com/openstack/ cinder/ commit/ a2a01b1241c8331 131a96a870fbbc1 38fb95a97a
Committed: http://
Submitter: Jenkins
Branch: stable/grizzly
commit a2a01b1241c8331 131a96a870fbbc1 38fb95a97a
Author: Flaper Fesp <email address hidden>
Date: Wed Sep 4 13:29:22 2013 +0200
Call to_primitive on volumes. rpcapi. create_ volume
cinder. volume. rpcapi. create_ volume does not convert the request_spec to
primitive before casting the request. This makes requests containing non
primitive types to fail. For example:
cinder create --metadata= Type=test --source-volid $VOLID 1
This will create a new database record and call create_volume on rpcpai. create_ volume will be called, which converts
volume.rpcapi. This will fail because VolumeMetadata won't be
serialized correctly when calling cast. This, however, is not True when
--source-volid is not passed because in such case,
scheduler.
request_spec to primitive correctly.
Closes-Bug 1213964
Conflicts: volume/ rpcapi. py
cinder/
(cherry-picked: 587eb5a6b9acc9f 02eee1147dbaafb 3782c295d5)
Change-Id: I4b91687cc1e5c9 33bdb3b04d8560b 0500da26541