Univention Bugzilla – Bug 31067
Check free disk space before extracting a downloaded image
Last modified: 2014-06-12 09:19:47 CEST
<http://forum.univention.de/viewtopic.php?f=64&t=2523&p=8619> ucc-thinclient-image, ucc-desktop-image and/or ucc-image-download should check if there is enough free disk space before downloading/extracting the image.
The check for free disk space in the download tool is already implemented, it only needs to consider some margin for the uncompression: vfs = os.statvfs(image_directory) free_diskspace = vfs.f_frsize * vfs.f_bfree if (free_diskspace < spec['total-size']): print "Not enough free diskspace to download the image" print "Needed: ", spec['total-size'] print "Available: ", free_diskspace sys.exit(1)
As discussed, the following behaviour has been implemented along with Bug 30379. The disk space is checked before downloading the files. When extracting, an IOError is caught (i.e., when running out of disk space) and the uncompressed file is being removed. That should be sufficient for now.
The error is caught and the not-fully-uncompressable image is removed.
UCC 2.0 has been released: http://docs.univention.de/release-notes-ucc-2.0.html If this error occurs again, please use "Clone This Bug".