Bug 1006400 - [engine-backend] [external-provider] disk gets stuck in 'Locked' state when importing an image which had been deleted from glance
[engine-backend] [external-provider] disk gets stuck in 'Locked' state when i...
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine (Show other bugs)
x86_64 Unspecified
unspecified Severity high
: ---
: 3.3.0
Assigned To: Federico Simoncelli
Depends On:
  Show dependency treegraph
Reported: 2013-09-10 10:41 EDT by Elad
Modified: 2016-02-10 14:00 EST (History)
10 users (show)

See Also:
Fixed In Version: is17
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2014-01-21 17:19:25 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: Storage
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
abaron: Triaged+

Attachments (Terms of Use)
logs and screenshot (999.69 KB, application/x-gzip)
2013-09-10 10:41 EDT, Elad
no flags Details

External Trackers
Tracker ID Priority Status Summary Last Updated
oVirt gerrit 19371 None None None Never
oVirt gerrit 19519 None None None Never

  None (edit)
Description Elad 2013-09-10 10:41:38 EDT
Created attachment 796039 [details]
logs and screenshot

Description of problem:
Importing an image, that had been deleted from glance-cli, from RHOS (by glance) to RHEV, leaving a disk that gets stuck in 'Locked' state.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. need to have a RHOS setup with images on it
2. add new external provider to RHEVM (glance images)
3. delete one of the images from glance (from /var/lib/glance/ dir)
4. try to import the image to RHEV data-center

Actual results:
vdsm fails to import the image:

5d9b632a-ed5f-4a0d-a361-bed68065ca45::ERROR::2013-09-10 17:06:08,810::task::850::TaskManager.Task::(_setError) Task=`5d9b632a-ed5f-4a0d-a361-bed68065ca45`::Unexpected error
Traceback (most recent call last):
  File "/usr/share/vdsm/storage/task.py", line 857, in _run
    return fn(*args, **kargs)
  File "/usr/share/vdsm/storage/task.py", line 318, in run
    return self.cmd(*self.argslist, **self.argsdict)
  File "/usr/share/vdsm/storage/securable.py", line 68, in wrapper
    return f(self, *args, **kwargs)
  File "/usr/share/vdsm/storage/sp.py", line 1985, in createVolume
    desc=desc, srcImgUUID=srcImgUUID, srcVolUUID=srcVolUUID)
  File "/usr/share/vdsm/storage/sd.py", line 411, in createVolume
    preallocate, diskType, volUUID, desc, srcImgUUID, srcVolUUID)
  File "/usr/share/vdsm/storage/volume.py", line 473, in create
    srcVolUUID, imgPath, volPath)
  File "/usr/share/vdsm/storage/blockVolume.py", line 178, in _create
  File "/usr/share/vdsm/storage/lvm.py", line 1026, in createLV
    raise se.CannotCreateLogicalVolume(vgName, lvName)
CannotCreateLogicalVolume: Cannot create Logical Volume: ('07b2ea73-27d3-46ba-832b-7fd5620443e4', 'c6f26cf1-a9fe-4301-a592-ac77a41d5cdb')

After the failure, the disk remains on DB in 'Locked' state forever:

from 'all_disks':

 imagestatus |            image_group_id
           2 | 664a3969-a224-4fed-addf-e67d1a7cbf73

Expected results:
The failure on vdsm should cause to failure in ImportRepoImageCommand and the disk should be cleaned from DB

Additional info: logs, screenshot
Comment 1 Elad 2013-10-14 06:55:29 EDT
When image is no longer accessible from glance, the disk gets cleaned in RHEV.

Verified on is18
Comment 2 Itamar Heim 2014-01-21 17:19:25 EST
Closing - RHEV 3.3 Released
Comment 3 Itamar Heim 2014-01-21 17:25:35 EST
Closing - RHEV 3.3 Released

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