Hide Forgot
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',)
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.