[Glance_store] RBD: On image creation error, image is not deleted

Bug #1632307 reported by Sergii Rizvan
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mirantis OpenStack
Invalid
High
Sergii Rizvan
7.0.x
Fix Released
High
Sergii Rizvan

Bug Description

Upstream bug: https://bugs.launchpad.net/glance-store/+bug/1449639

When an exception rises while adding/creating an image, and the image has been created, this new image is not properly deleted.

The fault lies in the `_delete_image` call of the Store.add method that is providing incorrect arguments.

From glance-api log: http://paste.openstack.org/show/585313/

Steps to reproduce:
1. Download some cloud image, for example:
wget http://cloud.centos.org/centos/6.6/images/CentOS-6-x86_64-GenericCloud-1508.qcow2

2. Start creating image with glance CLI:
glance image-create --file ./CentOS-6-x86_64-GenericCloud-1508.qcow2 --disk-format qcow2 --container-format bare --progress

3. Interrupt in creating process in the middle of creation with CTRL-C:
[=====================> ] 73%^C... terminating glance client

4. Inspect /var/log/glance/glance-api.log. Exception like this http://paste.openstack.org/show/585313/
 should be captured.

Reproducibility:
 Allways.

Impact:
 The bug prevents deleting a residual image from backend when an exception rises while adding/creating an image.

Description of the environment:
MOS 7.0
1 controller
3 compute + ceph_osd
Ceph backend for glance images.

Sergii Rizvan (srizvan)
Changed in mos:
status: Confirmed → Invalid
Sergii Rizvan (srizvan)
description: updated
Revision history for this message
Sergii Rizvan (srizvan) wrote :
Revision history for this message
TatyanaGladysheva (tgladysheva) wrote :

Verified on MOS 7.0 + MU6 updates.

After updates there is no exception in /var/log/glance/glance-api.log.

tags: added: on-automation
Revision history for this message
TatyanaGladysheva (tgladysheva) wrote :
tags: added: covered-automated-test
removed: on-automation
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.