Bug 1006400

Summary: [engine-backend] [external-provider] disk gets stuck in 'Locked' state when importing an image which had been deleted from glance
Product: Red Hat Enterprise Virtualization Manager Reporter: Elad <ebenahar>
Component: ovirt-engineAssignee: Federico Simoncelli <fsimonce>
Status: CLOSED CURRENTRELEASE QA Contact: Elad <ebenahar>
Severity: high Docs Contact:
Priority: unspecified    
Version: 3.3.0CC: abaron, acathrow, amureini, fsimonce, iheim, lpeer, Rhev-m-bugs, scohen, tnisan, yeylon
Target Milestone: ---Flags: abaron: Triaged+
Target Release: 3.3.0   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: storage
Fixed In Version: is17 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-01-21 22:19:25 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Storage RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
logs and screenshot none

Description Elad 2013-09-10 14:41:38 UTC
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):
rhevm-3.3.0-0.19.master.el6ev.noarch

How reproducible:
100%

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
    initialTag=TAG_VOL_UNINIT)
  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 10:55:29 UTC
When image is no longer accessible from glance, the disk gets cleaned in RHEV.

Verified on is18

Comment 2 Itamar Heim 2014-01-21 22:19:25 UTC
Closing - RHEV 3.3 Released

Comment 3 Itamar Heim 2014-01-21 22:25:35 UTC
Closing - RHEV 3.3 Released