Bug 706886 - [vdsm] When VM import fails due to lack of free space on target storage domain, image cannot be marked as illegal.
Summary: [vdsm] When VM import fails due to lack of free space on target storage domai...
Keywords:
Status: CLOSED CANTFIX
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: vdsm
Version: 6.1
Hardware: All
OS: Linux
unspecified
medium
Target Milestone: rc
: ---
Assignee: Federico Simoncelli
QA Contact: yeylon@redhat.com
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-05-23 11:17 UTC by Jakub Libosvar
Modified: 2016-04-18 06:40 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-06-09 08:01:43 UTC
Target Upstream Version:


Attachments (Terms of Use)
vdsm.log (10.54 MB, application/octet-stream)
2011-05-23 11:17 UTC, Jakub Libosvar
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 667109 1 None None None 2021-01-20 06:05:38 UTC

Internal Links: 667109

Description Jakub Libosvar 2011-05-23 11:17:34 UTC
Created attachment 500395 [details]
vdsm.log

Description of problem:
When storage domain runs out of free space while VM import is in process, importing image cannot be marked as illegal volume. This leads to keeping unfinished imported data on storage and image is not erased on rollback.

Version-Release number of selected component (if applicable):
vdsm-4.9-67.el6.x86_64
ic118

How reproducible:
Always

Steps to Reproduce:
1) Have storage domain with a few space on it (e.g. 12 GB)
2) Start import of machine with image larger than remaining free space on storage domain
(e.g. 15 GB)
3) After import fails due to lack of space, check image directory on storage

  
Actual results:
Volume is not illegal and remains on storage.

Expected results:
Volume is marked as illegal and imported VM is removed on rollback.

Additional info:

Tested on NFS domain


529dc078-491a-4edb-aca3-3dca03cd4c59::ERROR::2011-05-20 08:46:08,721::task::856::TaskManager.Task::(_setError) Unexpected error
Traceback (most recent call last):
  File "/usr/share/vdsm/storage/task.py", line 864, in _run
    return fn(*args, **kargs)
  File "/usr/share/vdsm/storage/task.py", line 367, in run
    return function(self.task, *argslist)
  File "/usr/share/vdsm/storage/volume.py", line 333, in createVolumeRollback
    vol.delete(postZero=False, force=True)
  File "/usr/share/vdsm/storage/fileVolume.py", line 169, in delete
    self.setLegality(volume.ILLEGAL_VOL)
  File "/usr/share/vdsm/storage/volume.py", line 421, in setLegality
    self.setMetaParam(LEGALITY, legality)
  File "/usr/share/vdsm/storage/volume.py", line 776, in setMetaParam
    self.setMetadata(meta)
  File "/usr/share/vdsm/storage/fileVolume.py", line 310, in setMetadata
    raise se.VolumeMetadataWriteError(vol_path + ":" + str(e))
VolumeMetadataWriteError: Error while updating volume meta data: ('/rhev/data-center/91e74c81-28d0-4182-92a0-8560271528c7/7455b093-ed9c-4be6-892f-3048035f1404/images/610870be-26fe-4518-b7ad-75649fb97aed/84f1cfb3-0cbd-4590-a5a3-00a3335a2dc9:[Errno 5] Input/output error',)

Comment 1 Dan Kenigsberg 2011-06-09 08:01:43 UTC
We've attempted to fix the problem in http://gerrit.usersys.redhat.com/532 , but after some thought we simply cannot guarantee safe volume deletion when filesystem is full.

Proper deletion requires marking the parent volume as leaf, which we cannot do when the filesystem is full; skipping this would make the whole image unusable. Better choice is to keep the current behavior and escalate the problem to the storage administer, who would have to extend the filesystem (or manually truncate a volume), and retry volume deletion.


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