Creating a server with block-device-mapping containing empty volume_size fails

Bug #1677236 reported by Dr. Jens Harbott
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-openstackclient
Fix Released
Undecided
Dr. Jens Harbott

Bug Description

This is a regression introduced somewhere after osc version 3.6.0. With that version, I can successfully create a server with an attached existing volume like

openstack server create --block-device-mapping vdb=<uuid>:::1 ... server1

(other options ommitted for readability).

With current OSC the same command fails and nova returns this error:

BadRequest: Invalid input for field/attribute volume_size. Value: . u'' does not match '^[0-9]+$' (HTTP 400) (Request-ID: req-0ca2a827-3de9-4fde-ac55-c21b92ce24e3)

Looking at the request in detail, the block_device_mapping_v2 section indeed contains a "volume_size": "" part, which is missing in the block_device_mapping section created by osc 3.6.0.

Changed in python-openstackclient:
assignee: nobody → Dr. Jens Rosenboom (j-rosenboom-j)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-openstackclient (master)

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

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

Reviewed: https://review.openstack.org/451432
Committed: https://git.openstack.org/cgit/openstack/python-openstackclient/commit/?id=61cde9c8e85182073b53e3736f8568f2a6d1453c
Submitter: Jenkins
Branch: master

commit 61cde9c8e85182073b53e3736f8568f2a6d1453c
Author: Jens Rosenboom <email address hidden>
Date: Wed Mar 29 14:17:49 2017 +0000

    Fix block-device-mapping when volume_size is empty

    The Nova API responds with an validation error when a bdm is submitted
    containing an empty volume_size. So instead omit that attribute when it
    is empty.

    Change-Id: Iba905fca8c440a03e828c20922f3b813bba3fa3a
    Closes-Bug: 1677236

Changed in python-openstackclient:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/python-openstackclient 3.10.0

This issue was fixed in the openstack/python-openstackclient 3.10.0 release.

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.