The volumes will be deleted when creating a virtual machine fails with the parameter delete_on_termination being set true, which causes that the rescheduling fails

Bug #1336127 reported by zhangtralon
18
This bug affects 3 people
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
High
Andrew Laski

Bug Description

when specifying a volume or an image with a user volume to create a virtual machine, if the virtual machine fails to be created for the first time with the parameter delete_on_termination being set “true”, the specified volume or the user volume will be deleted, which causes that the rescheduling fails.
for example:
1. upload a image
| 62aa6627-0a07-4ab4-a99f-2d99110db03e | cirros-0.3.2-x86_64-uec | ACTIVE
2.create a boot volume by the above image
cinder create --image-id 62aa6627-0a07-4ab4-a99f-2d99110db03e --availability-zone nova 1
| b821313a-9edb-474f-abb0-585a211589a6 | available | None | 1 | None | true | |
3. create a virtual machine
nova boot --flavor m1.tiny --nic net-id=28216e1d-f1c2-463b-8ae2-330a87e800d2 tralon_disk1 --block-device-mapping vda=b821313a-9edb-474f-abb0-585a211589a6::1:1
ERROR (BadRequest): Block Device Mapping is Invalid: failed to get volume b821313a-9edb-474f-abb0-585a211589a6. (HTTP 400) (Request-ID: req-486f7ab5-dc08-404e-8d4c-ac570d4f4aa1)
4. use the "cinder list" to find that the volume b821313a-9edb-474f-abb0-585a211589a6 has been deleted
+----+--------+------+------+-------------+----------+-------------+
| ID | Status | Name | Size | Volume Type | Bootable | Attached to |
+----+--------+------+------+-------------+----------+-------------+
+----+--------+------+------+-------------+----------+-------------+

Changed in nova:
assignee: nobody → zhangtralon (zhangchunlong1)
Tracy Jones (tjones-i)
tags: added: compute volumes
summary:
summary: - the boot volume will be deleted when creating a virtual machine fails
- with the parameter delete_on_termination being set true
+ The volumes will be deleted when creating a virtual machine fails with
+ the parameter delete_on_termination being set true, which causes that
+ the rescheduling fails
description: updated
description: updated
Andrew Laski (alaski)
Changed in nova:
importance: Undecided → High
status: New → Confirmed
Revision history for this message
Andrew Laski (alaski) wrote :
description: updated
Changed in nova:
assignee: zhangtralon (zhangchunlong1) → Andrew Laski (alaski)
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/106477
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=6ddd9f93f82427ce909c7773f7a806361035a0b2
Submitter: Jenkins
Branch: master

commit 6ddd9f93f82427ce909c7773f7a806361035a0b2
Author: Andrew Laski <email address hidden>
Date: Fri Jul 11 14:56:22 2014 -0400

    Don't remove delete_on_terminate volumes on a reschedule

    When cleaning up volumes before a reschedule if delete_on_terminate is
    True the volume would be deleted. That's not the desired behavior so
    the volume cleanup has been moved to take place when a build is aborted.

    Change-Id: I142370c0555495b4d51736f4f6b8070a3c112a59
    Closes-bug: #1336127

Changed in nova:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in nova:
milestone: none → juno-3
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: juno-3 → 2014.2
tags: added: icehouse-backport-potential
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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