Bug 1005481

Summary: [engine-backend] [external-provider] there is no indicator by engine about failure in DownloadImage
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: acanan, acathrow, amureini, fsimonce, iheim, lpeer, Rhev-m-bugs, scohen, sgotliv, yeylon
Target Milestone: ---   
Target Release: 3.3.0   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: storage
Fixed In Version: is15 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-01-21 22:13:34 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-07 13:03:45 UTC
Created attachment 795110 [details]
logs and screenshot

Description of problem:
When vdsm fails in downloadImage action, engine gets the failure message from vdsm, but does not report about the failure.

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


How reproducible:
100%

Steps to Reproduce:
1. add an external provider (glance) to rhevm with an image on it
2. block connectivity from rhos hosts to the device which contains the image
3. try to import the image to rhevm

Actual results:

#vdsm is failing to download the image from the given url:
636224e3-bc60-494b-9003-0db5841e711d::ERROR::2013-09-07 15:36:26,997::task::850::TaskManager.Task::(_setError) Task=`636224e3-bc60-494b-9003-0db5841e711d`::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 1873, in downloadImage
    .download(methodArgs, sdUUID, imgUUID, volUUID)
  File "/usr/share/vdsm/storage/image.py", line 1187, in download
    imageSharing.download(vol.getVolumePath(), methodArgs)
  File "/usr/share/vdsm/storage/imageSharing.py", line 76, in download
    downloadImageImpl(dstImgPath, methodArgs)
  File "/usr/share/vdsm/storage/imageSharing.py", line 44, in httpDownloadImage
    methodArgs.get("headers", {}))
  File "/usr/share/vdsm/storage/curlImgWrap.py", line 69, in download
    raise CurlError(rc, out, err)
CurlError: ecode=1, stdout=[], stderr=["fork_exec('/usr/bin/curl', 'curl', '-q', '--silent', '--fail', '--show-error', '-H', 'X-Auth-Token: 48ad7d2f2ed945e6abf8b06fbf44d624', 'http://opens-vdsb.qa.lab.tlv.redhat.com:9292/v1/images/75faa640-8934-4ee4-a9f3-3ede60ac866c')", "fork_exec('/bin/dd', 'dd', 'bs=2M', 'of=/rhev/data-center/7a93c0d1-1316-40e2-b946-3180c3415007/07b2ea73-27d3-46ba-832b-7fd5620443e4/images/176b1670-65ba-404f-a0f4-a26523d446ac/a5ef382e-5c4e-4f78-9eee-e413ab6dcad1')", "dd: writing `/rhev/data-center/7a93c0d1-1316-40e2-b946-3180c3415007/07b2ea73-27d3-46ba-832b-7fd5620443e4/images/176b1670-65ba-404f-a0f4-a26523d446ac/a5ef382e-5c4e-4f78-9eee-e413ab6dcad1': No space left on device", '0+255860 records in', '0+255859 records out', '1073741824 bytes (1.1 GB) copied, 231.588 s, 4.6 MB/s', 'curl: (23) Failed writing body (376 != 1448)'], message=None


#On engine.log:
, '--fail', '--show-error', '-H', 'X-Auth-Token: 48ad7d2f2ed945e6abf8b06fbf44d624', 'http://opens-vdsb.qa.lab.tlv.redhat.com:9292/v1/images/75faa640-8934-4ee4-a9f3-3ede60ac866c')", "fork_exec('/bin/dd', 'dd', 'bs=2M', 'of=/rhev/data-center/7a93c0d1-1316-40e2-b946-3180c3415007/07b2ea73-27d3-46ba-832b-7fd5620443e4/images/176b1670-65ba-404f-a0f4-a26523d446ac/a5ef382e-5c4e-4f78-9eee-e413ab6dcad1')", "dd: writing `/rhev/data-center/7a93c0d1-1316-40e2-b946-3180c3415007/07b2ea73-27d3-46ba-832b-7fd5620443e4/images/176b1670-65ba-404f-a0f4-a26523d446ac/a5ef382e-5c4e-4f78-9eee-e413ab6dcad1': No space left on device", '0+255860 records in', '0+255859 records out', '1073741824 bytes (1.1 GB) copied, 231.588 s, 4.6 MB/s', 'curl: (23) Failed writing body (376 != 1448)'], message=None,

On UI, there is an event about the disk removing that was done after the downloadImage failure.
There is no indication about the failure in DownloadImage

Expected results:
Engine should fail the task and revert it

Additional info:logs and screenshot

Comment 1 Elad 2013-09-07 13:55:38 UTC
Version-Release number of selected component (if applicable):
rhevm-3.3.0-0.16.master.el6ev.noarch
vdsm-4.12.0-72.git287bb7e.el6ev.x86_64

Comment 2 Elad 2013-09-07 14:26:33 UTC
Expected results:
Engine should fail the task, revert it and report about it to user

Comment 3 Elad 2013-09-23 13:52:07 UTC
I'm getting an event about failure in DownloadImageVDSCommand.
Also the disk is cleaned from system.

Verified on is15:
rhevm-3.3.0-0.22.master.el6ev.noarch
vdsm-4.12.0-138.gitab256be.el6ev.x86_64

Comment 4 Itamar Heim 2014-01-21 22:13:34 UTC
Closing - RHEV 3.3 Released

Comment 5 Itamar Heim 2014-01-21 22:21:26 UTC
Closing - RHEV 3.3 Released