Bug 1104672

Summary: prepareVolume fails to activate volume
Product: [Retired] oVirt Reporter: Jiri Moskovcak <jmoskovc>
Component: vdsmAssignee: Federico Simoncelli <fsimonce>
Status: CLOSED WONTFIX QA Contact: Aharon Canan <acanan>
Severity: urgent Docs Contact:
Priority: urgent    
Version: 3.5CC: acanan, acathrow, bazulay, dfediuck, fsimonce, gklein, iheim, mgoldboi, tnisan, yeylon
Target Milestone: ---Keywords: Triaged
Target Release: 3.5.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: storage
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-06-05 10:49:08 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:
Bug Depends On:    
Bug Blocks: 1036731, 1153278    
Attachments:
Description Flags
vdsm log none

Description Jiri Moskovcak 2014-06-04 13:30:13 UTC
Created attachment 902185 [details]
vdsm log

Description of problem:
When trying to activate volume using prepareVolume it fails with:  ImagePathError: Image path does not exist or cannot be accessed/created: ('/rhev/data-center/32dab0ff-9eaa-41c7-ae50-4e6ef6355512/831ef374-8947-47f2-938f-5ec938f4fcef/images/8f3f3871-6aab-4f26-811f-c8e1803414fd',)

Version-Release number of selected component (if applicable):
vdsm-4.14.6-0.el6.x86_64

How reproducible:
100%

Steps to Reproduce:
<python_snippet>
from vdsm import vdscli

spUUID='32dab0ff-9eaa-41c7-ae50-4e6ef6355512'
sdUUID='831ef374-8947-47f2-938f-5ec938f4fcef'
lockspace_volume_UUID='81fbcbaf-2264-4fa8-831f-da5bf9b5281b'
lockspace_image_UUID='8f3f3871-6aab-4f26-811f-c8e1803414fd'

con = vdscli.connect()
response = con.prepareVolume(
           sdUUID,
           spUUID,
           lockspace_image_UUID,
           lockspace_volume_UUID
           )

print response
</python_snippet>


Actual results:
Volume not activated

Expected results:
Volume activated

Additional info:
The image did exist before vdsm restart. VDSM deactivated the volume because it doesn't know the volume and removed the image and is failing to activate it.

Comment 1 Jiri Moskovcak 2014-06-04 14:00:53 UTC
Steps to reproduce:
1. create a volume using createVolume() call from vdsm api
2. restart vdsm (which deactivates that volume)
3. try to call prepareVolume() to activate the volume created in step 1.

Comment 2 Federico Simoncelli 2014-06-04 17:22:58 UTC
We should just tackle this with bug 1092166.
prepareVolume is not in use since a while and trying to fix it is probably more risky than just expose prepareImage.

Comment 3 Jiri Moskovcak 2014-06-05 06:57:46 UTC
or we can merge http://gerrit.ovirt.org/27880 because even if the prepareVolume (or Image) works it still means that at some point vdsm deactivated the volume which might be racy

Comment 4 Federico Simoncelli 2014-06-05 10:49:08 UTC
Closing this as wontfix since prepareVolume is deprecated. We'll continue on bug 1092166. I already updated bug 1036731 to reflect the new dependency.