Create server API accepts invalid device name in bdm

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

Bug Description

Branch: master

Steps to repro:
1. Boot a new instance from volume, specifying an incorrect device name.For example, following JSON request body containing a space in the device name:

{"server": {"name": "ins001", "imageRef": "f29a46e1-77f9-4f59-9003-cb723a4c09db", "block_device_mapping": [{"volume_size": "1", "volume_id": "0aeb1092-9946-4a91-9c17-af3cf4b24dc4", "delete_on_termination": "0", "device_name": "vd a"}], "flavorRef": "1", "max_count": 1, "min_count": 1}}

2. Monitor the newly spawned instance status.

Expected Behavior:
Nova API should return a 400 Bad Request response (since device name is invalid i.e. in this case contains a space).

Actual Behavior:
Nova API returns a 202 Accepted and the instance creation fails.

Tags: ntt
Changed in nova:
assignee: nobody → Unmesh Gurjar (unmesh-gurjar)
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/17592

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/17592
Committed: http://github.com/openstack/nova/commit/3b5679e44754ad5138e1697ba233d91776199853
Submitter: Jenkins
Branch: master

commit 3b5679e44754ad5138e1697ba233d91776199853
Author: Unmesh Gurjar <email address hidden>
Date: Thu Dec 6 01:14:20 2012 -0800

    Validated device_name value in block device map

    1. Checked value of device_name parameter provided in block device
    mapping section of Create server API.
    2. Added unit test coverage.

    Fixes LP: #1087165

    Change-Id: I32ed59a577167d9bf42cb3667bfb1ba3963d6c71

Changed in nova:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in nova:
milestone: none → grizzly-3
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: grizzly-3 → 2013.1
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.