Comment 2 for bug 1674233

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

Reviewed: https://review.openstack.org/452051
Committed: https://git.openstack.org/cgit/openstack/cinder/commit/?id=4d4ba60f9b284044683eeaa4ca80674a0b7ee6db
Submitter: Jenkins
Branch: master

commit 4d4ba60f9b284044683eeaa4ca80674a0b7ee6db
Author: dineshbhor <email address hidden>
Date: Mon Mar 20 17:00:30 2017 +0530

    Fix metadata api's raises TypeError

    Volume and Snapshot related metadata api's are raising
    "TypeError: object of type 'NoneType' has no len()" if incorrect
    formatted metadata is passed. The common
    'utils.check_metadata_properties' method is not validating the
    metadata properly. This TypeError exception raised is converted
    into HTTPBadRequest at wsgi layer.

    Fixed this issue by raising an 'InvalidVolumeMetadata' exception
    if incorrect formatted metadata is passed to these api's giving
    400 HTTPBadRequest to the user. There will no defference in terms
    of response status code from user's point of view.

    Closes-Bug: #1674233
    Change-Id: Id86bb9d0887cebdb007df973cf87257924560fbe