Bug 1302444 - 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 Edit
The volumes will be deleted when creating a virtual machine fails with the pa...
Status: CLOSED ERRATA
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-nova (Show other bugs)
5.0 (RHEL 7)
Unspecified Unspecified
urgent Severity urgent
: async
: 5.0 (RHEL 7)
Assigned To: Vladik Romanovsky
Prasanth Anbalagan
: ZStream
Depends On:
Blocks: 1305066
  Show dependency treegraph
 
Reported: 2016-01-27 17:23 EST by Vladik Romanovsky
Modified: 2018-02-08 06:11 EST (History)
14 users (show)

See Also:
Fixed In Version: openstack-nova-2014.1.5-27.el7ost
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1305066 (view as bug list)
Environment:
Last Closed: 2016-03-08 12:08:56 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Launchpad 1336127 None None None 2016-01-27 17:23 EST
OpenStack gerrit 106477 None None None 2016-01-29 06:38 EST

  None (edit)
Description Vladik Romanovsky 2016-01-27 17:23:02 EST
Cloned from launchpad bug 1336127

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 |
+----+--------+------+------+-------------+----------+-------------+
+----+--------+------+------+-------------+----------+-------------+
Comment 10 Prasanth Anbalagan 2016-03-01 16:13:57 EST
Following Block device mapping invalid exception with delete-on-terminate set to
1, the volume does not get deleted.

***************
Version
***************

[root@rhos-compute-node-02 ~(keystone_admin)]# yum list installed | grep openstack-nova
openstack-nova-api.noarch        2014.1.5-27.el7ost      @rhelosp-5.0-el7-puddle
openstack-nova-cert.noarch       2014.1.5-27.el7ost      @rhelosp-5.0-el7-puddle
openstack-nova-common.noarch     2014.1.5-27.el7ost      @rhelosp-5.0-el7-puddle
openstack-nova-compute.noarch    2014.1.5-27.el7ost      @rhelosp-5.0-el7-puddle
openstack-nova-conductor.noarch  2014.1.5-27.el7ost      @rhelosp-5.0-el7-puddle
openstack-nova-console.noarch    2014.1.5-27.el7ost      @rhelosp-5.0-el7-puddle
openstack-nova-novncproxy.noarch 2014.1.5-27.el7ost      @rhelosp-5.0-el7-puddle
openstack-nova-scheduler.noarch  2014.1.5-27.el7ost      @rhelosp-5.0-el7-puddle
[root@rhos-compute-node-02 ~(keystone_admin)]# 

****************
Logs
****************

[root@rhos-compute-node-02 ~(keystone_admin)]# cinder create --display-name vol1 1
+---------------------+--------------------------------------+
|       Property      |                Value                 |
+---------------------+--------------------------------------+
|     attachments     |                  []                  |
|  availability_zone  |                 nova                 |
|       bootable      |                false                 |
|      created_at     |      2016-03-01T21:08:40.346666      |
| display_description |                 None                 |
|     display_name    |                 vol1                 |
|      encrypted      |                False                 |
|          id         | d52baabc-f7ed-4da3-9cff-387d4d27e39b |
|       metadata      |                  {}                  |
|         size        |                  1                   |
|     snapshot_id     |                 None                 |
|     source_volid    |                 None                 |
|        status       |               creating               |
|     volume_type     |                 None                 |
+---------------------+--------------------------------------+
[root@rhos-compute-node-02 ~(keystone_admin)]# cinder list
+--------------------------------------+-----------+--------------+------+-------------+----------+-------------+
|                  ID                  |   Status  | Display Name | Size | Volume Type | Bootable | Attached to |
+--------------------------------------+-----------+--------------+------+-------------+----------+-------------+
| d52baabc-f7ed-4da3-9cff-387d4d27e39b | available |     vol1     |  1   |     None    |  false   |             |
+--------------------------------------+-----------+--------------+------+-------------+----------+-------------+
[root@rhos-compute-node-02 ~(keystone_admin)]# 



[root@rhos-compute-node-02 ~(keystone_admin)]# cinder reset-state --state error vol1
[root@rhos-compute-node-02 ~(keystone_admin)]# cinder list
+--------------------------------------+--------+--------------+------+-------------+----------+-------------+
|                  ID                  | Status | Display Name | Size | Volume Type | Bootable | Attached to |
+--------------------------------------+--------+--------------+------+-------------+----------+-------------+
| d52baabc-f7ed-4da3-9cff-387d4d27e39b | error  |     vol1     |  1   |     None    |  false   |             |
+--------------------------------------+--------+--------------+------+-------------+----------+-------------+
[root@rhos-compute-node-02 ~(keystone_admin)]# 
[root@rhos-compute-node-02 ~(keystone_admin)]# 
[root@rhos-compute-node-02 ~(keystone_admin)]# nova boot --image cirros --flavor 2  --block-device-mapping vdc=d52baabc-f7ed-4da3-9cff-387d4d27e39b:::1 vm1
ERROR: Block Device Mapping is Invalid: failed to get volume d52baabc-f7ed-4da3-9cff-387d4d27e39b. (HTTP 400) (Request-ID: req-94cd257a-751e-463c-a808-b9e043c5112a)
[root@rhos-compute-node-02 ~(keystone_admin)]# cinder list
+--------------------------------------+--------+--------------+------+-------------+----------+-------------+
|                  ID                  | Status | Display Name | Size | Volume Type | Bootable | Attached to |
+--------------------------------------+--------+--------------+------+-------------+----------+-------------+
| d52baabc-f7ed-4da3-9cff-387d4d27e39b | error  |     vol1     |  1   |     None    |  false   |             |
+--------------------------------------+--------+--------------+------+-------------+----------+-------------+
[root@rhos-compute-node-02 ~(keystone_admin)]#
Comment 12 errata-xmlrpc 2016-03-08 12:08:56 EST
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2016-0361.html

Note You need to log in before you can comment on or make changes to this bug.