pass incorrect volume_size in block_device_mapping

Bug #1335728 reported by huangtianhua
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Heat
Fix Released
Undecided
huangtianhua

Bug Description

1. create a stack with a OS::Nova::Server resource, and the property of 'block_device_mapping' is defined as:

------
    block_device_mapping: {'device_name': 'vdb', 'snapshot_id': 9ef5496e-7426-446a-bbc8-01f84d9c9972, delete_on_termination: True}]
   ------

2. we expected to create a server, and to attach a volume(which create from the snapshot ) to the server, but heat pass incorrect bdm with volume_size(0) to novaclient, so nova doesn't create a volume:

vdb:9ef5496e-7426-446a-bbc8-01f84d9c9972:0:True,

novaclient parse the bdm and then pass the block_device_mapping to nova as following:
 "block_device_mapping": [{
 "volume_size": "0",
 "snapshot_id": "9ef5496e-7426-446a-bbc8-01f84d9c9972",
 "delete_on_termination": "True",
 "device_name": "vdb"
}]

3. It's a bug

Changed in heat:
assignee: nobody → huangtianhua (huangtianhua)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to heat (master)

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

Changed in heat:
status: New → In Progress
tags: added: icehouse-backport-potential
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to heat (master)

Reviewed: https://review.openstack.org/103822
Committed: https://git.openstack.org/cgit/openstack/heat/commit/?id=37f98778f2c77d1c680a78bf79395c7a431ca506
Submitter: Jenkins
Branch: master

commit 37f98778f2c77d1c680a78bf79395c7a431ca506
Author: huangtianhua <email address hidden>
Date: Tue Jul 1 17:35:34 2014 +0800

    Fix pass incorrect volume_size while building bdm

    If specify device_name, snapshot_id, delete_on_termination=True
    and not specify volume_size for bdm while create a server,
    heat will pass the bdm such as {'vdd': '1234:snap:0:True'} to
    novaclient, the volume_size is incorrect,
    nova won't create a volume from the snapshot because the
    volume_size=0. If not specify volume_size, just to pass ''.

    Change-Id: Ic1407671cc7bc6695bcf8e0c9f86fbdbaf245658
    Closes-Bug: #1335728

Changed in heat:
status: In Progress → Fix Committed
Changed in heat:
milestone: none → juno-2
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in heat:
milestone: juno-2 → 2014.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.