Scenario: Launch an instance by providing an invalid metadata property (name/value more than 255 characters in length).
Branch: master
Expected Response: {"overLimit": {"message": "Metadata property key or value greater than 255 characters", "code": 413, "retryAfter": 0}}
Actual Response: {"overLimit": {"message": "Quota exceeded: code=MetadataLimitExceeded", "code": 413, "retryAfter": 0}}
Nova API logs a warning message "Quota exceeded for df43fc9c33f941d0a34f96d07070063a, metadata property key or value too long". However, the error code and message returned by the API are inappropriate (does not indicate the exact cause of error).
Also, the API accepts an empty key/value pair in metadata.
Fix proposed to branch: master /review. openstack. org/6068
Review: https:/