Nova Create Server API returns incorrect error response

Bug #965102 reported by Unmesh Gurjar
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Low
Unmesh Gurjar

Bug Description

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.

Tags: ntt
Changed in nova:
assignee: nobody → Unmesh Gurjar (unmesh-gurjar)
description: updated
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

Fix proposed to branch: master
Review: https://review.openstack.org/6068

Changed in nova:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/6068
Committed: http://github.com/openstack/nova/commit/56dfbb59f9ad61d7f45d97f233db5d1cf0a46879
Submitter: Jenkins
Branch: master

commit 56dfbb59f9ad61d7f45d97f233db5d1cf0a46879
Author: Unmesh Gurjar <email address hidden>
Date: Mon Apr 2 11:52:37 2012 +0530

    Fixed metadata validation err. Fixes bug 965102.

    1. Fixed the error message on specifying invalid server metadata key/value.
    2. Added check to disallow specifying blank metadata key.
    3. Added unit test coverage.

    Addressed review comments.

    Change-Id: I1f0002971dc236045d6e622641f46a4a30249d54

Changed in nova:
status: In Progress → Fix Committed
Devin Carlen (devcamcar)
Changed in nova:
milestone: none → folsom-1
importance: Undecided → Low
Thierry Carrez (ttx)
Changed in nova:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: folsom-1 → 2012.2
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.