Comment 7 for bug 1213964

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to cinder (stable/grizzly)

Reviewed: https://review.openstack.org/45861
Committed: http://github.com/openstack/cinder/commit/a2a01b1241c8331131a96a870fbbc138fb95a97a
Submitter: Jenkins
Branch: stable/grizzly

commit a2a01b1241c8331131a96a870fbbc138fb95a97a
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
    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.

    Closes-Bug 1213964

    Conflicts:
     cinder/volume/rpcapi.py

    (cherry-picked: 587eb5a6b9acc9f02eee1147dbaafb3782c295d5)

    Change-Id: I4b91687cc1e5c933bdb3b04d8560b0500da26541